Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jul 2002 02:53:46 -0700
From:      Alfred Perlstein <alfred@FreeBSD.org>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.bin/tail Makefile tail.c
Message-ID:  <20020715095346.GI77219@elvis.mu.org>
In-Reply-To: <xzpznwt9z21.fsf@flood.ping.uio.no>
References:  <200207141821.g6EIL7sf082110@freefall.freebsd.org> <xzpznwt9z21.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
* Dag-Erling Smorgrav <des@ofug.org> [020715 01:26] wrote:
> Alfred Perlstein <alfred@FreeBSD.org> writes:
> >   Log:
> >   WARNS=4, add
> 
> ===> usr.bin/tail
> cc -O -pipe -mcpu=ev56   -Werror -Wall -Wno-format-y2k -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wno-uninitialized  -c /usr/src/usr.bin/tail/forward.c
> cc -O -pipe -mcpu=ev56   -Werror -Wall -Wno-format-y2k -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wno-uninitialized  -c /usr/src/usr.bin/tail/misc.c
> cc1: warnings being treated as errors
> /usr/src/usr.bin/tail/misc.c: In function `mapprint':
> /usr/src/usr.bin/tail/misc.c:84: warning: comparison between signed and unsigned
> /usr/src/usr.bin/tail/misc.c: In function `maparound':
> /usr/src/usr.bin/tail/misc.c:114: warning: comparison between signed and unsigned
> *** Error code 1
> 
> Stop in /usr/src/usr.bin/tail.

Er, both size_t and off_t are pretty much the same one i386 and alpha...

Also, casting enomem of line 257 of reverse.c doesn't fix this warning
which makes no sense...

Index: reverse.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/tail/reverse.c,v
retrieving revision 1.16
diff -u -r1.16 reverse.c
--- reverse.c   13 Apr 2002 20:59:48 -0000      1.16
+++ reverse.c   15 Jul 2002 09:49:52 -0000
@@ -254,7 +254,7 @@
        }
 
        if (enomem) {
-               warnx("warning: %qd bytes discarded", enomem);
+               warnx("warning: %qd bytes discarded", (quad_t)enomem);
                rval = 1;
        }
 

cc -O -pipe -mcpu=ev56   -Wall -Wno-format-y2k -Wno-uninitialized  -c reverse.c
reverse.c: In function `r_buf':
reverse.c:257: warning: long long int format, off_t arg (arg 2)

from printf(3):

         Modifier          d, i           o, u, x, X            n
...
         q (deprecated)    quad_t         u_quad_t              quad_t *

???

Whatever, it's backed out.

-- 
-Alfred Perlstein [alfred@freebsd.org]
'Instead of asking why a piece of software is using "1970s technology,"
 start asking why software is ignoring 30 years of accumulated wisdom.'
Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020715095346.GI77219>