>From d0e669684cecb5d90d785debc05aefb78057afe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Thu, 21 May 2020 13:21:45 +0100 Subject: [PATCH] maint: fix issues with recent gcc -fanalyzer change * src/comm.c: This pragma is no longer needed (or supported) on GCC 10.1.0. * src/tsort.c: Fix the misplaced endif to ensure the code is included in all cases. --- src/comm.c | 5 ----- src/tsort.c | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) 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..8373ca161 100644 --- a/src/tsort.c +++ b/src/tsort.c @@ -280,6 +280,7 @@ record_relation (struct item *j, struct item *k) #if (__GNUC__ == 10 && 0 <= __GNUC_MINOR__) || 10 < __GNUC__ # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wanalyzer-null-dereference" +#endif if (!STREQ (j->str, k->str)) { k->count++; @@ -288,6 +289,7 @@ record_relation (struct item *j, struct item *k) p->next = j->top; j->top = p; } +#if (__GNUC__ == 10 && 0 <= __GNUC_MINOR__) || 10 < __GNUC__ # pragma GCC diagnostic pop #endif } -- 2.26.2