From: Paul Eggert Date: Tue, 13 Jan 2026 16:02:42 +0000 (-0800) Subject: stdcountof-h-tests: pacify -Wnested-externs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=388a172b7699f0778d20aa4a36b87b510002e23a;p=thirdparty%2Fgnulib.git stdcountof-h-tests: pacify -Wnested-externs * tests/test-stdcountof-h.c (test_func): Use top-level non-constant. --- diff --git a/ChangeLog b/ChangeLog index 8ce452f50d..c857f372bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2026-01-13 Paul Eggert + stdcountof-h-tests: pacify -Wnested-externs + * tests/test-stdcountof-h.c (test_func): Use top-level non-constant. + isinf-no-c++-tests: pacify -Wshadow * tests/test-isinf.c (mem_long_double): Rename this local type from memory_long_double, to avoid confusion with the top-level diff --git a/tests/test-stdcountof-h.c b/tests/test-stdcountof-h.c index 0b4c4cc15f..191ba5c779 100644 --- a/tests/test-stdcountof-h.c +++ b/tests/test-stdcountof-h.c @@ -78,11 +78,8 @@ test_func (int parameter[3]) ASSERT (countof (unbounded) >= 0); #endif - { - extern int a, b, c; - ASSERT (countof ((int[]) { a, b, c }) == 3); - ASSERT (countof (((int[]) { a, b, c })) == 3); - } + ASSERT (countof ((int[]) { integer, integer, integer }) == 3); + ASSERT (countof (((int[]) { integer, integer, integer })) == 3); /* Check that countof(...) is an expression of type size_t. */ #if !defined __cplusplus && HAVE__GENERIC