Prevent triggering Clang 12 -Wstring-concatenation warning
Wrap multi-line string literals in parentheses
to prevent a Clang 12 -Wstring-concatenation warning
(activated by -Wall), which caused the build to fail.
Fixes https://github.com/ARMmbed/mbedtls/issues/3586
Signed-off-by: Guido Vranken <guidovranken@gmail.com>
diff --git a/library/md2.c b/library/md2.c
index 5ebf072..e6e39c0 100644
--- a/library/md2.c
+++ b/library/md2.c
@@ -287,8 +287,8 @@
{ "message digest" },
{ "abcdefghijklmnopqrstuvwxyz" },
{ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" },
- { "12345678901234567890123456789012345678901234567890123456789012"
- "345678901234567890" }
+ { ("12345678901234567890123456789012345678901234567890123456789012"
+ "345678901234567890") }
};
static const size_t md2_test_strlen[7] =
diff --git a/library/md4.c b/library/md4.c
index ac95074..7fadfca 100644
--- a/library/md4.c
+++ b/library/md4.c
@@ -408,8 +408,8 @@
{ "message digest" },
{ "abcdefghijklmnopqrstuvwxyz" },
{ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" },
- { "12345678901234567890123456789012345678901234567890123456789012"
- "345678901234567890" }
+ { ("12345678901234567890123456789012345678901234567890123456789012"
+ "345678901234567890") }
};
static const size_t md4_test_strlen[7] =
diff --git a/library/md5.c b/library/md5.c
index 8cea902..147e94b 100644
--- a/library/md5.c
+++ b/library/md5.c
@@ -422,8 +422,8 @@
{ "message digest" },
{ "abcdefghijklmnopqrstuvwxyz" },
{ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" },
- { "12345678901234567890123456789012345678901234567890123456789012"
- "345678901234567890" }
+ { ("12345678901234567890123456789012345678901234567890123456789012"
+ "345678901234567890") }
};
static const size_t md5_test_buflen[7] =
diff --git a/library/ripemd160.c b/library/ripemd160.c
index 830f61b..abb92b7 100644
--- a/library/ripemd160.c
+++ b/library/ripemd160.c
@@ -478,8 +478,8 @@
{ "abcdefghijklmnopqrstuvwxyz" },
{ "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" },
{ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" },
- { "12345678901234567890123456789012345678901234567890123456789012"
- "345678901234567890" },
+ { ("12345678901234567890123456789012345678901234567890123456789012"
+ "345678901234567890") },
};
static const size_t ripemd160_test_strlen[TESTS] =
diff --git a/library/sha512.c b/library/sha512.c
index 80219d4..a3a2852 100644
--- a/library/sha512.c
+++ b/library/sha512.c
@@ -516,8 +516,8 @@
static const unsigned char sha512_test_buf[3][113] =
{
{ "abc" },
- { "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
- "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu" },
+ { ("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
+ "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu") },
{ "" }
};