From: Paul Eggert Date: Wed, 25 Oct 2023 01:33:44 +0000 (-0700) Subject: explicit_bzero-tests: pacify GCC 13.2.1 X-Git-Tag: v1.0~686 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=24582314bff315e93947e0a9cef33a562c25af3e;p=gnulib.git explicit_bzero-tests: pacify GCC 13.2.1 * tests/test-explicit_bzero.c: * tests/test-memset_explicit.c: Ignore -Wdangling pointer. --- diff --git a/ChangeLog b/ChangeLog index d5f78aeccf..8b846a1ca5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2023-10-24 Paul Eggert + + explicit_bzero-tests: pacify GCC 13.2.1 + * tests/test-explicit_bzero.c: + * tests/test-memset_explicit.c: + Ignore -Wdangling pointer. + 2023-10-22 Bruno Haible memset_explicit, explicit_bzero tests: Fix test failures with new gcc. diff --git a/tests/test-explicit_bzero.c b/tests/test-explicit_bzero.c index f29f0ea0da..c4e4ddde77 100644 --- a/tests/test-explicit_bzero.c +++ b/tests/test-explicit_bzero.c @@ -41,6 +41,11 @@ static char zero[SECRET_SIZE] = { 0 }; # define explicit_bzero(a, n) memset (a, '\0', n) #endif +/* Suppress GCC 13.2.1 false alarm, as this test needs a dangling pointer. */ +#if 12 <= __GNUC__ +# pragma GCC diagnostic ignored "-Wdangling-pointer" +#endif + /* =================== Verify operation on static memory =================== */ static char stbuf[SECRET_SIZE]; diff --git a/tests/test-memset_explicit.c b/tests/test-memset_explicit.c index cdc7fc30b2..5852caec02 100644 --- a/tests/test-memset_explicit.c +++ b/tests/test-memset_explicit.c @@ -43,6 +43,11 @@ static char zero[SECRET_SIZE] = { 0 }; # define memset_explicit(a, c, n) memset (a, c, n) #endif +/* Suppress GCC 13.2.1 false alarm, as this test needs a dangling pointer. */ +#if 12 <= __GNUC__ +# pragma GCC diagnostic ignored "-Wdangling-pointer" +#endif + /* =================== Verify operation on static memory =================== */ static char stbuf[SECRET_SIZE];