Code quality: Fix some cppcheck messages
This commit addresses these kind of errors: portability: Passing NULL after the last typed argument to a variadic function leads to undefined behaviour. [varFuncNullUB] Reason is that C does not guarantee that all pointer types are the same size. See C99 6.2.5(27). cppcheck requires some sort of cast when NULL is used as the last argument in a variadic list.
This commit is contained in:
@@ -133,7 +133,7 @@ START_TEST(test_list__simple_strdup_multi)
|
||||
list_add_strdup_multi(lst,
|
||||
"0", "1", "2", "3", "4", "5",
|
||||
"6", "7", "8", "9", "10", "11",
|
||||
NULL);
|
||||
LIST_ADD_STRDUP_TERM);
|
||||
|
||||
ck_assert_int_eq(lst->count, 12);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user