Skip to content

Commit

Permalink
rand: appease clang-12 and later
Browse files Browse the repository at this point in the history
[11/28] Compiling C object dfuzzer.p/src_rand.c.o
../src/rand.c:541:17: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]
                "%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n",
                ^
../src/rand.c:540:17: note: place parentheses around the string literal to silence warning
                "%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n" \
                ^
1 warning generated.

Reported in #63 (comment)
  • Loading branch information
mrc0mmand committed Sep 22, 2023
1 parent c19d320 commit 9b3c4e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rand.c
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,8 @@ int df_rand_string(gchar **buf, guint64 iteration)
static const char *test_strings[] = {
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"%s%s%s%s%s%s%s%s%s%n%s%n%n%n%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
"%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n" \
"%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n",
("%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n"
"%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n"),
"bomb(){ bomb|bomb & }; bomb",
":1.285",
"org.freedesktop.foo",
Expand Down

0 comments on commit 9b3c4e0

Please sign in to comment.