From 50db10b7ca89fa89e4dca9b62fbb2aa5aeb3d034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Wed, 16 Sep 2020 10:33:01 +0200 Subject: [PATCH] Fix the clang 12 warnings with multi-line strings in string arrays The clang 12 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. (cherry picked from commit 7b07f22969149ceb24ad9491696fabb66c333524) --- lib/dns/tests/private_test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/dns/tests/private_test.c b/lib/dns/tests/private_test.c index 9e9b4ff848..4da68a29da 100644 --- a/lib/dns/tests/private_test.c +++ b/lib/dns/tests/private_test.c @@ -158,8 +158,8 @@ private_signing_totext_test(void **state) { const char *results[] = { "Signing with key 12345/RSASHA512", "Removing signatures for key 54321/RSASHA256", "Done signing with key 22222/NSEC3RSASHA1", - "Done removing signatures for key " - "33333/RSASHA1" }; + ("Done removing signatures for key " + "33333/RSASHA1") }; int ncases = 4; UNUSED(state); @@ -193,8 +193,8 @@ private_nsec3_totext_test(void **state) { const char *results[] = { "Creating NSEC3 chain 1 0 1 BEEF", "Creating NSEC3 chain 1 1 10 DADD", "Pending NSEC3 chain 1 0 20 BEAD", - "Removing NSEC3 chain 1 0 30 DEAF / creating " - "NSEC chain", + ("Removing NSEC3 chain 1 0 30 DEAF / " + "creating NSEC chain"), "Removing NSEC3 chain 1 0 100 FEEDABEE" }; int ncases = 5;