* tests/test-gc-arctwo.c (main): Mark arrays as _GL_ATTRIBUTE_NONSTRING.
* tests/test-sf-istream.c (test_open_stream): Likewise.
* tests/test-sfl-istream.c (test_open_stream): Likewise.
* tests/unilbrk/test-u8-possible-linebreaks.c (test_function): Likewise.
* tests/unilbrk/test-u8-width-linebreaks.c (test_function): Likewise.
* tests/unilbrk/test-ulc-possible-linebreaks.c (test_function):
Likewise.
* tests/unilbrk/test-ulc-width-linebreaks.c (test_function): Likewise.
* tests/uniwbrk/test-u8-wordbreaks.c (main): Likewise.
* tests/uniwbrk/test-ulc-wordbreaks.c (main): Likewise.
+2025-04-26 Bruno Haible <bruno@clisp.org>
+
+ Silence gcc 15 -Wunterminated-string-initialization warnings.
+ * tests/test-gc-arctwo.c (main): Mark arrays as _GL_ATTRIBUTE_NONSTRING.
+ * tests/test-sf-istream.c (test_open_stream): Likewise.
+ * tests/test-sfl-istream.c (test_open_stream): Likewise.
+ * tests/unilbrk/test-u8-possible-linebreaks.c (test_function): Likewise.
+ * tests/unilbrk/test-u8-width-linebreaks.c (test_function): Likewise.
+ * tests/unilbrk/test-ulc-possible-linebreaks.c (test_function):
+ Likewise.
+ * tests/unilbrk/test-ulc-width-linebreaks.c (test_function): Likewise.
+ * tests/uniwbrk/test-u8-wordbreaks.c (main): Likewise.
+ * tests/uniwbrk/test-ulc-wordbreaks.c (main): Likewise.
+
2025-04-25 Collin Funk <collin.funk1@gmail.com>
pselect: Disable signature check on AIX.
{
gc_cipher_handle ctx;
/* Test vectors from RFC 2268. */
- static char key[8] = "\xff\xff\xff\xff\xff\xff\xff\xff";
- static char plaintext[8] = "\xff\xff\xff\xff\xff\xff\xff\xff";
- static const char ciphertext[8] = "\x27\x8b\x27\xe4\x2e\x2f\x0d\x49";
+ static char key[8] _GL_ATTRIBUTE_NONSTRING =
+ "\xff\xff\xff\xff\xff\xff\xff\xff";
+ static char plaintext[8] _GL_ATTRIBUTE_NONSTRING =
+ "\xff\xff\xff\xff\xff\xff\xff\xff";
+ static const char ciphertext[8] _GL_ATTRIBUTE_NONSTRING =
+ "\x27\x8b\x27\xe4\x2e\x2f\x0d\x49";
char scratch[16];
Gc_rc rc;
int
main ()
{
- char const contents[CONTENTS_LEN] = CONTENTS;
+ char const contents[CONTENTS_LEN] _GL_ATTRIBUTE_NONSTRING = CONTENTS;
/* Test reading from a file. */
{
int
main ()
{
- char const contents[CONTENTS_LEN] = CONTENTS;
+ char const contents[CONTENTS_LEN] _GL_ATTRIBUTE_NONSTRING = CONTENTS;
/* Test reading from a file. */
{
my_u8_possible_linebreaks (NULL, 0, "GB18030", NULL);
{
- static const uint8_t input[91] =
+ static const uint8_t input[91] _GL_ATTRIBUTE_NONSTRING =
/* "Grüß Gott. Здравствуйте! x=(-b±sqrt(b²-4ac))/(2a) 日本語,中文,한글" */
"Gr\303\274\303\237 Gott. \320\227\320\264\321\200\320\260\320\262\321\201\321\202\320\262\321\203\320\271\321\202\320\265! x=(-b\302\261sqrt(b\302\262-4ac))/(2a) \346\227\245\346\234\254\350\252\236,\344\270\255\346\226\207,\355\225\234\352\270\200\n";
/* CR LF handling. */
{
- static const uint8_t input[8] = "a\nb\rc\r\nd";
+ static const uint8_t input[8] _GL_ATTRIBUTE_NONSTRING = "a\nb\rc\r\nd";
char *p = (char *) malloc (SIZEOF (input));
size_t i;
/* Test that a break is possible after a zero-width space followed by some
regular spaces (rule LB8 in Unicode TR#14 revision 26). */
{
- static const uint8_t input[6] = "x\342\200\213 y";
+ static const uint8_t input[6] _GL_ATTRIBUTE_NONSTRING = "x\342\200\213 y";
char *p = (char *) malloc (SIZEOF (input));
size_t i;
/* Test line breaking in a string with HTML markup. */
{
- static const uint8_t input[21] = "<P>Some sentence.</P>";
+ static const uint8_t input[21] _GL_ATTRIBUTE_NONSTRING = "<P>Some sentence.</P>";
char *p = (char *) malloc (SIZEOF (input));
size_t i;
/* Test line breaking of combining marks. */
{
- static const uint8_t input[24] =
+ static const uint8_t input[24] _GL_ATTRIBUTE_NONSTRING =
"a\314\200\314\201e\314\200 \314\201o \314\200 o\302\240\314\200\n"
"\314\200";
char *p = (char *) malloc (SIZEOF (input));
/* Test line breaking of zero-width joiners (U+200D). */
{
- static const uint8_t input[101] =
+ static const uint8_t input[101] _GL_ATTRIBUTE_NONSTRING =
"\346\234\211\347\204\241\347\252\256\345\244\232\345\200\213\347\264\240\346\225\270\343\200\202\n" /* "有無窮多個素數。" */
"\346\234\211\342\200\215\347\204\241\342\200\215\347\252\256\345\244\232\345\200\213\347\264\240\342\200\215\346\225\270\343\200\202\n"
"\344\275\240\342\200\224\344\270\215\n" /* "你—不" */
/* Test line breaking of regional indicators. */
{
- static const uint8_t input[16] =
+ static const uint8_t input[16] _GL_ATTRIBUTE_NONSTRING =
"\360\237\207\251\360\237\207\252\360\237\207\253\360\237\207\267";
char *p = (char *) malloc (SIZEOF (input));
size_t i;
/* Test special behaviour of hyphen/break-after character after
Hebrew letter. */
{
- static const uint8_t input[15] = /* "ab-אב-αβ-ω" */
+ static const uint8_t input[15] _GL_ATTRIBUTE_NONSTRING = /* "ab-אב-αβ-ω" */
"ab-\327\220\327\221-\316\261\316\262-\317\211";
char *p = (char *) malloc (SIZEOF (input));
size_t i;
/* Test special behaviour before East Asian opening parenthesis (LB30). */
{
- static const uint8_t input[49] = /* "日中韓統合漢字拡張G「ユニコード」" */
+ static const uint8_t input[49] _GL_ATTRIBUTE_NONSTRING =
+ /* "日中韓統合漢字拡張G「ユニコード」" */
"\346\227\245\344\270\255\351\237\223\347\265\261\345\220\210\346\274\242"
"\345\255\227\346\213\241\345\274\265G\343\200\214\343\203\246"
"\343\203\213\343\202\263\343\203\274\343\203\211\343\200\215";
/* Test special behaviour of potential future emoji (LB30b). */
{
- static const uint8_t input[8] = "\360\237\277\274\360\237\217\277";
+ static const uint8_t input[8] _GL_ATTRIBUTE_NONSTRING =
+ "\360\237\277\274\360\237\217\277";
char *p = (char *) malloc (SIZEOF (input));
size_t i;
my_u8_width_linebreaks (NULL, 0, 80, 0, 0, NULL, "GB18030", NULL);
{
- static const uint8_t input[91] =
+ static const uint8_t input[91] _GL_ATTRIBUTE_NONSTRING =
/* "Grüß Gott. Здравствуйте! x=(-b±sqrt(b²-4ac))/(2a) 日本語,中文,한글" */
"Gr\303\274\303\237 Gott. \320\227\320\264\321\200\320\260\320\262\321\201\321\202\320\262\321\203\320\271\321\202\320\265! x=(-b\302\261sqrt(b\302\262-4ac))/(2a) \346\227\245\346\234\254\350\252\236,\344\270\255\346\226\207,\355\225\234\352\270\200\n";
#if HAVE_ICONV
{
- static const char input[36] =
+ static const char input[36] _GL_ATTRIBUTE_NONSTRING =
/* "Grüß Gott. x=(-b±sqrt(b²-4ac))/(2a)" */
"Gr\374\337 Gott. x=(-b\261sqrt(b\262-4ac))/(2a)\n";
char *p = (char *) malloc (SIZEOF (input));
/* Test line breaking in a string with HTML markup. */
{
- static const char input[21] = "<P>Some sentence.</P>";
+ static const char input[21] _GL_ATTRIBUTE_NONSTRING =
+ "<P>Some sentence.</P>";
char *p = (char *) malloc (SIZEOF (input));
size_t i;
#if HAVE_ICONV
{
- static const char input[36] =
+ static const char input[36] _GL_ATTRIBUTE_NONSTRING =
/* "Grüß Gott. x=(-b±sqrt(b²-4ac))/(2a)" */
"Gr\374\337 Gott. x=(-b\261sqrt(b\262-4ac))/(2a)\n";
char *p = (char *) malloc (SIZEOF (input));
u8_wordbreaks (NULL, 0, NULL);
{
- static const uint8_t input[91] =
+ static const uint8_t input[91] _GL_ATTRIBUTE_NONSTRING =
/* "Grüß Gott. Здравствуйте! x=(-b±sqrt(b²-4ac))/(2a) 日本語,中文,한글" */
"Gr\303\274\303\237 Gott. \320\227\320\264\321\200\320\260\320\262\321\201\321\202\320\262\321\203\320\271\321\202\320\265! x=(-b\302\261sqrt(b\302\262-4ac))/(2a) \346\227\245\346\234\254\350\252\236,\344\270\255\346\226\207,\355\225\234\352\270\200\n";
char *p = (char *) malloc (SIZEOF (input));
{
/* Same input string, decomposed. */
- static const uint8_t input[106] =
+ static const uint8_t input[106] _GL_ATTRIBUTE_NONSTRING =
/* "Grüß Gott. Здравствуйте! x=(-b±sqrt(b²-4ac))/(2a) 日本語,中文,한글" */
"Gru\314\210\303\237 Gott. \320\227\320\264\321\200\320\260\320\262\321\201\321\202\320\262\321\203\320\270\314\206\321\202\320\265! x=(-b\302\261sqrt(b\302\262-4ac))/(2a) \346\227\245\346\234\254\350\252\236,\344\270\255\346\226\207,\341\204\222\341\205\241\341\206\253\341\204\200\341\205\263\341\206\257\n";
char *p = (char *) malloc (SIZEOF (input));
/* CR LF handling. */
{
- static const uint8_t input[8] = "a\nb\rc\r\nd";
+ static const uint8_t input[8] _GL_ATTRIBUTE_NONSTRING = "a\nb\rc\r\nd";
char *p = (char *) malloc (SIZEOF (input));
size_t i;
/* Test regional indicators. */
{
- static const uint8_t input[18] =
+ static const uint8_t input[18] _GL_ATTRIBUTE_NONSTRING =
".\360\237\207\251\360\237\207\252\360\237\207\253\360\237\207\267.";
char *p = (char *) malloc (SIZEOF (input));
size_t i;
#if HAVE_ICONV
{
- static const char input[36] =
+ static const char input[36] _GL_ATTRIBUTE_NONSTRING =
/* "Grüß Gott. x=(-b±sqrt(b²-4ac))/(2a)" */
"Gr\374\337 Gott. x=(-b\261sqrt(b\262-4ac))/(2a)\n";
char *p = (char *) malloc (SIZEOF (input));