]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
ls: remove unnecessary pragmas
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 18 Feb 2024 05:51:03 +0000 (21:51 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 18 Feb 2024 08:29:59 +0000 (00:29 -0800)
* src/ls.c (decode_switches): Remove pragmas.  They are no longer
needed to pacify GCC 13.2.1 with --enable-gcc-checking, and there’s
little point keeping them around for older GCC versions.

src/ls.c

index 18bb3f84e1d6c406bb954ee1a74e23346d29acbb..d5964173271af4bfce4269fb9188d643d0886c6e 100644 (file)
--- a/src/ls.c
+++ b/src/ls.c
@@ -2284,19 +2284,11 @@ decode_switches (int argc, char **argv)
 #ifdef TIOCGWINSZ
       if (linelen < 0)
         {
-          /* Suppress bogus warning re comparing ws.ws_col to big integer.  */
-# if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
-#  pragma GCC diagnostic push
-#  pragma GCC diagnostic ignored "-Wtype-limits"
-# endif
           struct winsize ws;
           if (stdout_isatty ()
               && 0 <= ioctl (STDOUT_FILENO, TIOCGWINSZ, &ws)
               && 0 < ws.ws_col)
             linelen = ws.ws_col <= MIN (PTRDIFF_MAX, SIZE_MAX) ? ws.ws_col : 0;
-# if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
-#  pragma GCC diagnostic pop
-# endif
         }
 #endif
       if (linelen < 0)