From dbe39fd8c789e69dc2df8b63ad960ee79f0ce24d Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 14 Oct 2025 12:38:24 +0300 Subject: [PATCH] global: Use ATTR_NONSTRING macro --- src/lib-imap/test-imap-utf7.c | 3 ++- src/lib-index/test-mail-cache.c | 2 +- src/lib-master/master-service-haproxy.c | 2 +- src/lib-otp/otp-dictionary.c | 2 +- src/lib/ostream-multiplex.c | 2 +- src/lib/test-istream-sized.c | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/lib-imap/test-imap-utf7.c b/src/lib-imap/test-imap-utf7.c index 216eebf4a7..ac9892d98a 100644 --- a/src/lib-imap/test-imap-utf7.c +++ b/src/lib-imap/test-imap-utf7.c @@ -98,7 +98,8 @@ static void test_imap_utf7_ucs4_cases(void) test_end(); } -static const char mb64[64]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+,"; +static const char mb64[64] ATTR_NONSTRING = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+,"; static void test_imap_utf7_non_utf16(void) { string_t *dest, *dest2; diff --git a/src/lib-index/test-mail-cache.c b/src/lib-index/test-mail-cache.c index b0c97b8108..352e57f26a 100644 --- a/src/lib-index/test-mail-cache.c +++ b/src/lib-index/test-mail-cache.c @@ -9,7 +9,7 @@ struct test_header_data { uint32_t line1, line2; uint32_t end_of_lines; - char headers[8]; + char headers[8] ATTR_NONSTRING; }; enum { diff --git a/src/lib-master/master-service-haproxy.c b/src/lib-master/master-service-haproxy.c index e5cf4254ea..1b37e9bcbd 100644 --- a/src/lib-master/master-service-haproxy.c +++ b/src/lib-master/master-service-haproxy.c @@ -49,7 +49,7 @@ enum { HAPROXY_SOCK_DGRAM = 0x02 }; -static const char haproxy_v2sig[12] = +static const char haproxy_v2sig[12] ATTR_NONSTRING = "\x0D\x0A\x0D\x0A\x00\x0D\x0A\x51\x55\x49\x54\x0A"; struct haproxy_header_v2 { diff --git a/src/lib-otp/otp-dictionary.c b/src/lib-otp/otp-dictionary.c index 5a1315737c..073ed9d461 100644 --- a/src/lib-otp/otp-dictionary.c +++ b/src/lib-otp/otp-dictionary.c @@ -45,7 +45,7 @@ static const struct hint hints[] = { struct word { const short value; - const char word[4]; + const char word[4] ATTR_NONSTRING; }; static const struct word dictionary[2048] = { diff --git a/src/lib/ostream-multiplex.c b/src/lib/ostream-multiplex.c index ab981e9c92..b44dbd4382 100644 --- a/src/lib/ostream-multiplex.c +++ b/src/lib/ostream-multiplex.c @@ -38,7 +38,7 @@ struct multiplex_ostream { bool destroyed:1; }; -static unsigned char ostream_multiplex_header[IOSTREAM_MULTIPLEX_HEADER_SIZE] = +static unsigned char ostream_multiplex_header[IOSTREAM_MULTIPLEX_HEADER_SIZE] ATTR_NONSTRING = "\xFF\xFF\xFF\xFF\xFF\x00\x02" IOSTREAM_MULTIPLEX_CHANNEL_SWITCH_PREFIX; diff --git a/src/lib/test-istream-sized.c b/src/lib/test-istream-sized.c index 82fa6631f3..0d0e36b646 100644 --- a/src/lib/test-istream-sized.c +++ b/src/lib/test-istream-sized.c @@ -55,7 +55,7 @@ run_test(const char *sized_input, uoff_t sized_size, int stream_errno) static void test_istream_sized_full(bool exact) { - const unsigned char test_data[10] = "1234567890"; + const unsigned char test_data[10] ATTR_NONSTRING = "1234567890"; struct istream *test_input, *input; unsigned int i, j; int expected_errno; -- 2.47.3