From owner-freebsd-bugs@FreeBSD.ORG Sun Sep 19 15:10:23 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1CFF616A4CE for ; Sun, 19 Sep 2004 15:10:23 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7B1D43D1D for ; Sun, 19 Sep 2004 15:10:22 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i8JFAM0T032871 for ; Sun, 19 Sep 2004 15:10:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8JFAM28032870; Sun, 19 Sep 2004 15:10:22 GMT (envelope-from gnats) Date: Sun, 19 Sep 2004 15:10:22 GMT Message-Id: <200409191510.i8JFAM28032870@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Ruslan Ermilov Subject: Re: bin/71855: making kdump WARNS=6 clean X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Ruslan Ermilov List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2004 15:10:23 -0000 The following reply was made to PR bin/71855; it has been noted by GNATS. From: Ruslan Ermilov To: Divacky Roman Cc: bug-followup@FreeBSD.org Subject: Re: bin/71855: making kdump WARNS=6 clean Date: Sun, 19 Sep 2004 18:01:29 +0300 On Sat, Sep 18, 2004 at 11:03:57AM +0200, Divacky Roman wrote: > > >Description: > This makes kdump partially WARNS=6 clean... its also necessary to resolve > conflict between pccard/cardinfo.h and sys/memrange.h MDF_ACTIVE define... > > >How-To-Repeat: > apply this patch and do "something" with that MDF_ACTIVE define > >Fix: > diff -urN /usr/src/usr.bin/kdump/Makefile kdump/Makefile > --- /usr/src/usr.bin/kdump/Makefile Tue Jul 23 11:15:45 2002 > +++ /usr/src/usr.bin/kdump/Makefile Sat Sep 18 10:52:49 2004 > @@ -6,6 +6,7 @@ > PROG= kdump > SRCS= kdump.c ioctl.c subr.c > CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR}/../.. > +WARNS?= 6 > > CLEANFILES= ioctl.c > This is unsafe, please see below. > diff -urN /usr/src/usr.bin/kdump/kdump.c kdump/kdump.c > --- /usr/src/usr.bin/kdump/kdump.c Thu Mar 25 13:33:55 2004 > +++ /usr/src/usr.bin/kdump/kdump.c Sat Sep 18 10:52:49 2004 > @@ -79,6 +79,7 @@ > void ktrcsw(struct ktr_csw *); > void ktruser(int, unsigned char *); > void usage(void); > +extern const char *ioctlname(register_t); > > int timestamp, decimal, fancy = 1, tail, maxdata; > const char *tracefile = DEF_TRACEFILE; > @@ -285,7 +286,6 @@ > { > int narg = ktr->ktr_narg; > register_t *ip; > - const char *ioctlname(u_long); > > if (ktr->ktr_code >= nsyscalls || ktr->ktr_code < 0) > (void)printf("[%d]", ktr->ktr_code); > I've committed a variation of this, thanks! > --- /usr/src/sys/sys/diskpc98.h Wed Apr 7 06:19:49 2004 > +++ /usr/src/sys/sys/diskpc98.h Sat Sep 18 10:57:10 2004 > @@ -36,9 +36,11 @@ > #include > > #define DOSBBSECTOR 0 /* DOS boot block relative sector number */ > +#ifdef PC98 > #define DOSPARTOFF 0 > #define NDOSPART 16 > #define DOSPTYP_386BSD 0x94 /* 386BSD partition type */ > +#endif > > struct pc98_partition { > unsigned char dp_mid; > This won't be committed, as it's bogus. It's bogus because these defines are correct, and the problem you see is elsewhere, not in this header. A kdump(1) is special in that it tries to show as much ioctl names as possible. For this, it dynamically builds a list of all ioctls by scanning the system headers and looking for "_IO" defines. As you never know if there will be a conflict in names or not (the exact list of headers used is unknown and unpredictable), bumping a WARNS level to 6 will likely cause breakages in the future. While "it would be nice" to have kdump(1) compile without warnings, guaranteeing this in a long term is troublesome. Cheers, -- Ruslan Ermilov ru@FreeBSD.org FreeBSD committer