]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: omit unnecessary pragmas and fix tsort.c
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 20 May 2020 23:40:26 +0000 (16:40 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 21 May 2020 00:32:52 +0000 (17:32 -0700)
* 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
src/comm.c
src/tsort.c

index 6c221d28780bb0f10401d1ec1dcf5a8469564cad..f1e37eb266762303309ae6c1cd0fdb6dc46764db 100644 (file)
 
 /* 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 <config.h>
 #include <stdio.h>
 #include <sys/types.h>
index 826023c34aa624ddef27d70f09ff1d2a37bec7f1..2bf8094bf7ac3635825e2253cef6106f27ec79fa 100644 (file)
 
 /* 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 <config.h>
 
 #include <getopt.h>
index cff2d3a654747050709236f325452ef91206188f..2a6961aa7472400195c8eff9225b1b8d0160ef9c 100644 (file)
@@ -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