From: Bruno Haible Date: Mon, 20 Mar 2023 18:46:06 +0000 (+0100) Subject: memrchr tests: Avoid GCC warning. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=c91d081ddfb456a1dec595a8bec993f6e363b8a7;p=gnulib.git memrchr tests: Avoid GCC warning. * tests/test-memrchr.c: Don't use '#pragma GCC diagnostic' for GCC versions older than 4.7. --- diff --git a/ChangeLog b/ChangeLog index f99842cdd6..55c449e6f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-03-20 Bruno Haible + + 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 vasnprintf: Fix potentially wrong zero-padding. diff --git a/tests/test-memrchr.c b/tests/test-memrchr.c index 3d2c0cdc0e..7c52e7ca2e 100644 --- a/tests/test-memrchr.c +++ b/tests/test-memrchr.c @@ -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