Hi Ossama,
On 04/24/2019 12:48 PM, Ossama Othman wrote:
Declare the fixed string in unit/test-checksum.c as a static array
instead of a string literal to address a warning exhibited by Clang 8
regarding addition of an integer to a string:
unit/test-checksum.c:170:30: warning: adding 'unsigned long' to a
string does not append to the string [-Wstring-plus-int]
iov[1].iov_base = FIXED_STR + FIXED_LEN / 2;
~~~~~~~~~~^~~~~~~~~~~~~~~
unit/test-checksum.c:170:30: note: use array indexing to silence this
warning
iov[1].iov_base = FIXED_STR + FIXED_LEN / 2;
^
& [ ]
Storing the string in an array makes it obvious that pointer
arithmetic is being performed.
---
unit/test-checksum.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
Applied, thanks.
Regards,
-Denis