Skip to content

Commit

Permalink
test/cmdline: fix inputs array
Browse files Browse the repository at this point in the history
[ upstream commit 414245b ]

clang 12 gives a warning about string concatenation in arrays.
In this case it looks like it was unintentional to concatenate
the strings. Separate with a comma.

$ clang --version
clang version 12.0.0 (Fedora 12.0.0-0.3.rc1.fc34)

../app/test/test_cmdline_ipaddr.c:259:3: warning:
suspicious concatenation of string literals in an array initialization;
did you mean to separate the elements with a comma?
[-Wstring-concatenation]
"random invalid text",
^
../app/test/test_cmdline_ipaddr.c:258:3: note:
place parentheses around the string literal to silence warning
"1234:1234:1234:1234:1234:1234:1234:1234:1234:1234:1234"
^

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
  • Loading branch information
kevintraynor authored and cpaelzer committed May 17, 2021
1 parent 34bb672 commit 20d9298
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/test/test_cmdline_ipaddr.c
Expand Up @@ -255,7 +255,7 @@ const char * ipaddr_invalid_strs[] = {
/** misc **/

/* too long */
"1234:1234:1234:1234:1234:1234:1234:1234:1234:1234:1234"
"1234:1234:1234:1234:1234:1234:1234:1234:1234:1234:1234",
"random invalid text",
"",
"\0",
Expand Down

0 comments on commit 20d9298

Please sign in to comment.