From owner-cvs-all Sat Jan 26 12:20:18 2002 Delivered-To: cvs-all@freebsd.org Received: from rwcrmhc53.attbi.com (rwcrmhc53.attbi.com [204.127.198.39]) by hub.freebsd.org (Postfix) with ESMTP id B823137B400; Sat, 26 Jan 2002 12:20:07 -0800 (PST) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc53.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020126202007.ZXVN10199.rwcrmhc53.attbi.com@InterJet.elischer.org>; Sat, 26 Jan 2002 20:20:07 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id MAA37755; Sat, 26 Jan 2002 12:18:03 -0800 (PST) Date: Sat, 26 Jan 2002 12:18:02 -0800 (PST) From: Julian Elischer To: David Malone Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, dillon@FreeBSD.org, jake@FreeBSD.org Subject: Re: cvs commit: src/sys/vm vm.h In-Reply-To: <20020126200150.GA21646@walton.maths.tcd.ie> Message-ID: 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 this looks ok.. you should see similar on all the other .h files that may be used in userland. (for a sanity check) On Sat, 26 Jan 2002, David Malone wrote: > On Sat, Jan 26, 2002 at 11:13:01AM -0800, Julian Elischer wrote: > > > OK, but I think something in userland sees this declaration and gcc > > > whines about it. I might have made the change originally when I was > > > playing with WARNS and gcc3. Should this declaration be protected > > > by a #ifdef _KERNEL? > > > All in-kernel prototypes should be invisible to userland. > > OK - How does the patch below look? > > > > I can go an dig up what produced the warning if you think that I > > > would be better fixing it some other way. > > Here's the warning for what it's worth. I get it the usual version > of gcc when I turn WARNS up on killall. I guess it means there are > two problems - parameter name shadowing a global and kernel > declarations visable in userland. > > Maybe Matt or Jake can suggest a better name for the parameter if > people want to leave the parameter with a name. > > David. > > ===> usr.bin/killall > cc -nostdinc -O -pipe -I/usr/obj/usr/src/i386/usr/include -Werror -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wno-uninitialized -c /usr/src/usr.bin/killall/killall.c > cc1: warnings being treated as errors > In file included from /usr/obj/usr/src/i386/usr/include/sys/user.h:51, > from /usr/src/usr.bin/killall/killall.c:33: > /usr/obj/usr/src/i386/usr/include/vm/vm.h:130: warning: declaration of `kmi' shadows global declaration > *** Error code 1 > > Index: sys/vm/vm.h > =================================================================== > RCS file: /cvs/FreeBSD-CVS/src/sys/vm/vm.h,v > retrieving revision 1.19 > diff -u -r1.19 vm.h > --- sys/vm/vm.h 22 Aug 2001 04:07:27 -0000 1.19 > +++ sys/vm/vm.h 26 Jan 2002 19:55:35 -0000 > @@ -126,8 +126,10 @@ > vm_offset_t pager_eva; > }; > > +#ifdef _KERNEL > extern struct kva_md_info kmi; > -extern void vm_ksubmap_init(struct kva_md_info *kmi); > +extern void vm_ksubmap_init(struct kva_md_info *); > +#endif /* _KERNEL */ > > #endif /* VM_H */ > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message