From 94f25cc670d0a9c81db75881ab7da0a4b19b9f11 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 25 Apr 2023 00:14:01 +0200 Subject: =?UTF-8?q?tests:=20Suppress=20=E2=80=98#pragma=20GCC=20diagnostic?= =?UTF-8?q?=E2=80=99=20warnings=20with=20GCC=20<=2013.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * tests/test-localename.c: Disable #pragma for GCC < 12. * tests/test-dup2.c: Disable #pragma for GCC < 13. * tests/test-fcntl.c: Likewise. * tests/test-getdtablesize.c: Likewise. * tests/test-listen.c: Likewise. * tests/test-open.h: Likewise. * tests/test-perror2.c: Likewise. * tests/test-select.h: Likewise. --- ChangeLog | 12 ++++++++++++ tests/test-dup2.c | 2 +- tests/test-fcntl.c | 4 +--- tests/test-getdtablesize.c | 2 +- tests/test-listen.c | 2 +- tests/test-localename.c | 2 +- tests/test-open.h | 2 +- tests/test-perror2.c | 2 +- tests/test-select.h | 2 +- 9 files changed, 20 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 587b210323..2ecdc47512 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2023-04-24 Bruno Haible + + tests: Suppress ‘#pragma GCC diagnostic’ warnings with GCC < 13. + * tests/test-localename.c: Disable #pragma for GCC < 12. + * tests/test-dup2.c: Disable #pragma for GCC < 13. + * tests/test-fcntl.c: Likewise. + * tests/test-getdtablesize.c: Likewise. + * tests/test-listen.c: Likewise. + * tests/test-open.h: Likewise. + * tests/test-perror2.c: Likewise. + * tests/test-select.h: Likewise. + 2023-04-24 Bruno Haible select, pselect: Fix test failure on native Windows. diff --git a/tests/test-dup2.c b/tests/test-dup2.c index e7957271ad..8acbc038ca 100644 --- a/tests/test-dup2.c +++ b/tests/test-dup2.c @@ -51,7 +51,7 @@ SIGNATURE_CHECK (dup2, int, (int, int)); #include "macros.h" /* Tell GCC not to warn about the specific edge cases tested here. */ -#if __GNUC__ >= 10 +#if __GNUC__ >= 13 # pragma GCC diagnostic ignored "-Wanalyzer-fd-leak" # pragma GCC diagnostic ignored "-Wanalyzer-fd-use-without-check" #endif diff --git a/tests/test-fcntl.c b/tests/test-fcntl.c index c2b7377b59..5fb554afe7 100644 --- a/tests/test-fcntl.c +++ b/tests/test-fcntl.c @@ -45,10 +45,8 @@ SIGNATURE_CHECK (fcntl, int, (int, int, ...)); #include "macros.h" /* Tell GCC not to warn about the specific edge cases tested here. */ -#if __GNUC__ >= 10 -# pragma GCC diagnostic ignored "-Wanalyzer-fd-leak" -#endif #if __GNUC__ >= 13 +# pragma GCC diagnostic ignored "-Wanalyzer-fd-leak" # pragma GCC diagnostic ignored "-Wanalyzer-va-arg-type-mismatch" #endif diff --git a/tests/test-getdtablesize.c b/tests/test-getdtablesize.c index 4eb28d9b1e..d2c93f19a4 100644 --- a/tests/test-getdtablesize.c +++ b/tests/test-getdtablesize.c @@ -26,7 +26,7 @@ SIGNATURE_CHECK (getdtablesize, int, (void)); #include "macros.h" /* Tell GCC not to warn about the specific edge cases tested here. */ -#if __GNUC__ >= 10 +#if __GNUC__ >= 13 # pragma GCC diagnostic ignored "-Wanalyzer-fd-leak" #endif diff --git a/tests/test-listen.c b/tests/test-listen.c index b245e48f3a..8d85779bfc 100644 --- a/tests/test-listen.c +++ b/tests/test-listen.c @@ -28,7 +28,7 @@ SIGNATURE_CHECK (listen, int, (int, int)); #include "macros.h" /* Tell GCC not to warn about the specific edge cases tested here. */ -#if __GNUC__ >= 10 +#if __GNUC__ >= 13 # pragma GCC diagnostic ignored "-Wanalyzer-fd-use-without-check" #endif diff --git a/tests/test-localename.c b/tests/test-localename.c index 090afeb538..6d97efb050 100644 --- a/tests/test-localename.c +++ b/tests/test-localename.c @@ -36,7 +36,7 @@ #endif /* Suppress GCC false positive. */ -#if __GNUC__ >= 10 +#if __GNUC__ >= 12 # pragma GCC diagnostic ignored "-Wanalyzer-use-of-uninitialized-value" #endif diff --git a/tests/test-open.h b/tests/test-open.h index f01523dc16..d3af8215d0 100644 --- a/tests/test-open.h +++ b/tests/test-open.h @@ -17,7 +17,7 @@ /* Written by Bruno Haible , 2007. */ /* Tell GCC not to warn about the specific edge cases tested here. */ -#if __GNUC__ >= 10 +#if __GNUC__ >= 13 # pragma GCC diagnostic ignored "-Wanalyzer-fd-leak" #endif diff --git a/tests/test-perror2.c b/tests/test-perror2.c index 0c96832d37..25390ff533 100644 --- a/tests/test-perror2.c +++ b/tests/test-perror2.c @@ -23,7 +23,7 @@ #include /* Tell GCC not to warn about myerr being leaked. */ -#if __GNUC__ >= 10 +#if __GNUC__ >= 13 # pragma GCC diagnostic ignored "-Wanalyzer-fd-leak" #endif diff --git a/tests/test-select.h b/tests/test-select.h index af840d2bc8..902e085bcd 100644 --- a/tests/test-select.h +++ b/tests/test-select.h @@ -38,7 +38,7 @@ #endif /* Tell GCC not to warn about the specific edge cases tested here. */ -#if __GNUC__ >= 10 +#if __GNUC__ >= 13 # pragma GCC diagnostic ignored "-Wanalyzer-fd-use-without-check" #endif -- cgit v1.2.1