From owner-freebsd-audit Mon May 28 0: 1:16 2001 Delivered-To: freebsd-audit@freebsd.org Received: from ringworld.nanolink.com (ringworld.nanolink.com [195.24.48.13]) by hub.freebsd.org (Postfix) with SMTP id E374D37B423 for ; Mon, 28 May 2001 00:01:12 -0700 (PDT) (envelope-from roam@orbitel.bg) Received: (qmail 9231 invoked by uid 1000); 28 May 2001 07:00:17 -0000 Date: Mon, 28 May 2001 10:00:17 +0300 From: Peter Pentchev To: Mike Heffner Cc: freebsd-audit@freebsd.org Subject: Re: cmp(1) patch Message-ID: <20010528100017.B8450@ringworld.oblivion.bg> Mail-Followup-To: Mike Heffner , freebsd-audit@freebsd.org References: <20010527232926.A85869@cowpie.acm.vt.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010527232926.A85869@cowpie.acm.vt.edu>; from mheffner@cowpie.acm.vt.edu on Sun, May 27, 2001 at 11:29:27PM -0400 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, May 27, 2001 at 11:29:27PM -0400, Mike Heffner wrote: > BDECFLAGS cleanup, respect -s flag in one place, return instead of > exit() at end of main. Please review. > > Index: cmp.c > =================================================================== > RCS file: /home/ncvs/src/usr.bin/cmp/cmp.c,v > retrieving revision 1.9 > diff -u -r1.9 cmp.c > --- cmp.c 2000/07/25 13:01:34 1.9 > +++ cmp.c 2001/05/26 21:57:56 > @@ -58,6 +58,7 @@ > > int lflag, sflag, xflag, zflag; > > +int main __P((int, char *[])); > static void usage __P((void)); Does gcc with BDECFLAGS really complain for a missing prototype on main()? I thought gcc was smart enough (it is, at least on -stable).. [roam@ringworld:v4 ~/c/misc/foo]$ cat Makefile CFLAGS+= ${BDECFLAGS} PROG= foo NOMAN= yes .include [roam@ringworld:v4 ~/c/misc/foo]$ cat foo.c #include int main(int argc __unused, char *argv[] __unused) { printf("Hell world!\n"); return (0); } [roam@ringworld:v4 ~/c/misc/foo]$ make clean all rm -f foo foo.o Warning: Object directory not changed from original /usr/home/roam/lang/c/misc/foo cc -O -pipe -W -Wall -ansi -pedantic -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Winline -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -c foo.c cc -O -pipe -W -Wall -ansi -pedantic -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Winline -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -o foo foo.o G'luck, Peter -- If I had finished this sentence, To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message