>From e18efcfd0422b892ddd165035bad4f241591aa17 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 20 May 2020 16:40:26 -0700 Subject: [PATCH 1/2] maint: omit unnecessary pragmas and fix tsort.c * src/chown-core.c, src/comm.c: * src/tsort.c (record_relation): Remove GCC 10 pragmas that are not needed in GCC 10.1.0 (the first public GCC 10 release) and that in some cases cause diagnostics with GCC 10.1.0. The tsort.c change fixes a bug that was inadvertantly introduced when these pragmas were added. --- src/chown-core.c | 5 ----- src/comm.c | 5 ----- src/tsort.c | 8 -------- 3 files changed, 18 deletions(-) diff --git a/src/chown-core.c b/src/chown-core.c index 6c221d287..f1e37eb26 100644 --- a/src/chown-core.c +++ b/src/chown-core.c @@ -16,11 +16,6 @@ /* Extracted from chown.c/chgrp.c and librarified by Jim Meyering. */ -/* GCC 10 gives a false postive warning with -fanalyzer for this. */ -#if (__GNUC__ == 10 && 0 <= __GNUC_MINOR__) || 10 < __GNUC__ -# pragma GCC diagnostic ignored "-Wanalyzer-double-free" -#endif - #include #include #include diff --git a/src/comm.c b/src/comm.c index 826023c34..2bf8094bf 100644 --- a/src/comm.c +++ b/src/comm.c @@ -16,11 +16,6 @@ /* Written by Richard Stallman and David MacKenzie. */ -/* GCC 10 gives a false postive warning with -fanalyzer for this. */ -#if (__GNUC__ == 10 && 0 <= __GNUC_MINOR__) || 10 < __GNUC__ -# pragma GCC diagnostic ignored "-Wanalyzer-use-of-uninitialized-value" -#endif - #include #include diff --git a/src/tsort.c b/src/tsort.c index cff2d3a65..2a6961aa7 100644 --- a/src/tsort.c +++ b/src/tsort.c @@ -274,12 +274,6 @@ record_relation (struct item *j, struct item *k) { struct successor *p; -/* GCC 10 gives a false postive warning with -fanalyzer for this, - and an assert did not suppress the warning - with the initial GCC 10 release. */ -#if (__GNUC__ == 10 && 0 <= __GNUC_MINOR__) || 10 < __GNUC__ -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wanalyzer-null-dereference" if (!STREQ (j->str, k->str)) { k->count++; @@ -288,8 +282,6 @@ record_relation (struct item *j, struct item *k) p->next = j->top; j->top = p; } -# pragma GCC diagnostic pop -#endif } static bool -- 2.25.4