Skip to content

Fix the GCC 10 warnings with multi-line strings in string arrays

Ondřej Surý requested to merge ondrej/fix-split-string-warnings-gcc-10 into main

The GCC 10 has a new warning that warns when using multi-line strings in the string arrays, f.e.:

{ "aa",
  "b"
  "b",
  "cc" }

would generate warning like this:

private_test.c:162:7: error: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Werror,-Wstring-concatenation]
                                  "33333/RSASHA1" };
                                  ^
private_test.c:161:7: note: place parentheses around the string literal to silence warning
                                  "Done removing signatures for key "
                                  ^
private_test.c:197:7: error: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Werror,-Wstring-concatenation]
                                  "NSEC chain",
                                  ^
private_test.c:196:7: note: place parentheses around the string literal to silence warning
                                  "Removing NSEC3 chain 1 0 30 DEAF / creating "
                                  ^
2 errors generated.

Merge request reports