]> Savannah Git Hosting - gnulib.git/commitdiff
memrchr tests: Avoid GCC warning.
authorBruno Haible <bruno@clisp.org>
Mon, 20 Mar 2023 18:46:06 +0000 (19:46 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 22 Mar 2023 21:53:25 +0000 (22:53 +0100)
* tests/test-memrchr.c: Don't use '#pragma GCC diagnostic' for GCC
versions older than 4.7.

ChangeLog
tests/test-memrchr.c

index f99842cdd67e6c22d7c60f9032524703d640583f..55c449e6f5cabfd73ae62ceec72d2fd54aa4b785 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-03-20  Bruno Haible  <bruno@clisp.org>
+
+       memrchr tests: Avoid GCC warning.
+       * tests/test-memrchr.c: Don't use '#pragma GCC diagnostic' for GCC
+       versions older than 4.7.
+
 2023-03-19  Bruno Haible  <bruno@clisp.org>
 
        vasnprintf: Fix potentially wrong zero-padding.
index 3d2c0cdc0ea9af328a0c86a75e869ab3d2ff1525..7c52e7ca2e794910c24c6cdcd842df7113c05e13 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2023 Free Software Foundation, Inc.
  * Written by Eric Blake and Bruno Haible
  *
  * This program is free software: you can redistribute it and/or modify
@@ -28,7 +28,7 @@ SIGNATURE_CHECK (memrchr, void *, (void const *, int, size_t));
 #include "macros.h"
 
 /* Work around GCC bug 101494.  */
-#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__) && __GNUC__ < 12
+#if 4 < __GNUC__ + (7 <= __GNUC_MINOR__) && __GNUC__ < 12
 # pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
 #endif