Oops, two of the tests were incorrect. Fixed as follows:
2024-11-06 Bruno Haible <[email protected]> strncat, wcsncat tests: Fix test. * tests/test-strncat.c (main): Change y to a valid string. * tests/test-wcsncat.c (main): Change y to a valid wide string. diff --git a/tests/test-strncat.c b/tests/test-strncat.c index c4668d95b4..c7fe68227e 100644 --- a/tests/test-strncat.c +++ b/tests/test-strncat.c @@ -69,7 +69,7 @@ main () #endif { - char y[1]; + char y[2] = { 'x', '\0' }; value = (strncat (y, NULL, 0) == y); ASSERT (value); } diff --git a/tests/test-wcsncat.c b/tests/test-wcsncat.c index b8479dfb5e..1b838261f2 100644 --- a/tests/test-wcsncat.c +++ b/tests/test-wcsncat.c @@ -39,7 +39,7 @@ main () #endif { - wchar_t y[1]; + wchar_t y[2] = { L'x', 0 }; value = (wcsncat (y, NULL, 0) == y); ASSERT (value); }
