From owner-cvs-all Mon Jul 15 3:27:32 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC41337B407; Mon, 15 Jul 2002 03:27:25 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 96D6A43E4A; Mon, 15 Jul 2002 03:27:24 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id UAA28136; Mon, 15 Jul 2002 20:27:22 +1000 Date: Mon, 15 Jul 2002 20:30:51 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Alfred Perlstein Cc: Dag-Erling Smorgrav , , Subject: Re: cvs commit: src/usr.bin/tail Makefile tail.c In-Reply-To: <20020715095346.GI77219@elvis.mu.org> Message-ID: <20020715202642.V40071-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 15 Jul 2002, Alfred Perlstein wrote: > Er, both size_t and off_t are pretty much the same one i386 and alpha... Actually, the are quite different. > 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; > } This makes sense. %qd is just an alias for %lld, so it unsuitable for printing anything except long longs. Neither off_t nor quad_t is long long on alphas. > 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. This says that %qd should never be used. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message