]> Savannah Git Hosting - gnulib.git/commitdiff
explicit_bzero-tests: pacify GCC 13.2.1
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 25 Oct 2023 01:33:44 +0000 (18:33 -0700)
committerBruno Haible <bruno@clisp.org>
Sun, 5 Nov 2023 19:00:24 +0000 (20:00 +0100)
* tests/test-explicit_bzero.c:
* tests/test-memset_explicit.c:
Ignore -Wdangling pointer.

ChangeLog
tests/test-explicit_bzero.c
tests/test-memset_explicit.c

index de61a5fa0b30cbc5f667f06fb600b9c247c4835c..f5c3a1bdce03acb5fad04506fe66e0b438d63508 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-10-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+       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  <bruno@clisp.org>
 
        memset_explicit, explicit_bzero tests: Fix test failures with new gcc.
index f29f0ea0dacb3c15e1817138c2c806ff8bcc3194..c4e4ddde772e48d3e0d72099e75b354c3c03b649 100644 (file)
@@ -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];
index cdc7fc30b2a2cefb3b5d7270369005b74bfa5a0e..5852caec02ab6be5d642d48cc4459958b206073e 100644 (file)
@@ -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];