Subject: kern/27138: fail to make a kernel with cgd and DEBUG option
To: None <gnats-bugs@gnats.NetBSD.org>
From: Ryo HAYASAKA <ryoh@jaist.ac.up>
List: netbsd-bugs
Date: 10/04/2004 18:29:24
>Number: 27138
>Category: kern
>Synopsis: fail to make a kernel with cgd and DEBUG option
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Oct 04 10:44:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Ryo HAYASAKA
>Release: NetBSD 2.99.9
>Organization:
Japan Advanced Institute of Science and Technology (JAIST)
>Environment:
System: NetBSD bonnie.jaist.ac.jp 2.99.9 NetBSD 2.99.9 (BONNIE) #507: Sun Oct 3 09:44:57 JST 2004 ryoh@bonnie.jaist.ac.jp:/usr/src/sys/arch/i386/compile/BONNIE i386
Architecture: i386
Machine: i386
ryoh@bonnie$ ident cgd.c
cgd.c:
$NetBSD: cgd.c,v 1.19 2004/08/23 05:38:15 thorpej Exp $
>Description:
A kernel with cgd and DEBUG option fails to build as follows:
ryoh@bonnie$ make dependall
...
# compile BONNIE/cgd.o
cc -pipe -ffreestanding -g -march=athlon-xp -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wno-sign-compare -fno-zero-initialized-in-bss -Di386 -I. -I../../../../arch -I../../../.. -nostdinc -DLKM -DDIAGNOSTIC -DDEBUG -DEXT2FS_SYSTEM_FLAGS -DMSGBUFSIZE=131072 -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I../../../../dist/pf -I../../../../dist/ipf -c ../../../../dev/cgd.c
../../../../dev/cgd.c: In function `cgdiodone':
../../../../dev/cgd.c:371: warning: long int format, int arg (arg 3)
../../../../dev/cgd.c:371: warning: long int format, int arg (arg 4)
../../../../dev/cgd.c:373: warning: long int format, int arg (arg 6)
*** Error code 1
Stop.
The change of some members of "struct buf" from long to int in sys/buf.h
of rev 1.75 by yamt causes this type incompatible warning. dev/cgd.c
should be changed like the "Fix."
>How-To-Repeat:
Turn on cgd and DEBUG option in your kernel config file, and do "make
dependall."
>Fix:
Index: cgd.c
===================================================================
RCS file: /usr/cvsup/src/sys/dev/cgd.c,v
retrieving revision 1.19
diff -d -p -u -r1.19 cgd.c
--- cgd.c 23 Aug 2004 05:38:15 -0000 1.19
+++ cgd.c 4 Oct 2004 08:38:01 -0000
@@ -368,9 +368,9 @@ cgdiodone(struct buf *nbp)
KDASSERT(cs);
DPRINTF_FOLLOW(("cgdiodone(%p)\n", nbp));
- DPRINTF(CGDB_IO, ("cgdiodone: bp %p bcount %ld resid %ld\n",
+ DPRINTF(CGDB_IO, ("cgdiodone: bp %p bcount %d resid %d\n",
obp, obp->b_bcount, obp->b_resid));
- DPRINTF(CGDB_IO, (" dev 0x%x, nbp %p bn %" PRId64 " addr %p bcnt %ld\n",
+ DPRINTF(CGDB_IO, (" dev 0x%x, nbp %p bn %" PRId64 " addr %p bcnt %d\n",
nbp->b_dev, nbp, nbp->b_blkno, nbp->b_data,
nbp->b_bcount));
if (nbp->b_flags & B_ERROR) {
>Release-Note:
>Audit-Trail:
>Unformatted: