]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
pg: do not turn off warnigns artificially
authorSami Kerola <kerolasa@iki.fi>
Mon, 8 Oct 2012 07:08:15 +0000 (08:08 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 15 Oct 2012 14:47:43 +0000 (16:47 +0200)
Compiler warnings often mean something, fiddling with them is not good
practise.  Besides the 'proglem' removed macro tried to 'fix' does not
even occur when compiling with modern gcc.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
text-utils/pg.c

index ae0075874993cffb2737a0b61e69b6978887882d..54129d7c0e5f18973a4c7df91448697c50db90fe 100644 (file)
 #define CMDBUF         255             /* size of command buffer */
 #define        TABSIZE         8               /* spaces consumed by tab character */
 
-/*
- * Avoid the message "`var' might be clobbered by `longjmp' or `vfork'"
- */
-#define        CLOBBGRD(a)     (void)(&(a));
-
 #define        cuc(c)          ((c) & 0377)
 
 enum { FORWARD = 1, BACKWARD = 2 };    /* search direction */
@@ -986,22 +981,6 @@ pgfile(FILE *f, const char *name)
         */
        FILE *fbuf, *find, *save;
 
-       /* silence compiler - it may warn about longjmp() */
-       CLOBBGRD(line);
-       CLOBBGRD(fline);
-       CLOBBGRD(bline);
-       CLOBBGRD(oldline);
-       CLOBBGRD(eofline);
-       CLOBBGRD(dline);
-       CLOBBGRD(ttycols);
-       CLOBBGRD(search);
-       CLOBBGRD(searchcount);
-       CLOBBGRD(seekeof);
-       CLOBBGRD(eof);
-       CLOBBGRD(fpos);
-       CLOBBGRD(nobuf);
-       CLOBBGRD(fbuf);
-
        if (ontty == 0) {
                /*
                 * Just copy stdin to stdout.