Subject: kern/32207: bba driver does not compile with AUDIO_DEBUG
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Pavel Cahyna <pcah8322@artax.karlin.mff.cuni.cz>
List: netbsd-bugs
Date: 12/01/2005 11:42:00
>Number:         32207
>Category:       kern
>Synopsis:       bba driver does not compile with AUDIO_DEBUG
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 01 11:42:00 +0000 2005
>Originator:     Pavel Cahyna
>Release:        NetBSD 3.0_RC3
>Organization:
>Environment:
System: NetBSD beta 3.0_RC3 NetBSD 3.0_RC3 (BETA) #5: Thu Nov 24 23:10:12 CET 2005 pavel@beta:/usr/src/sys/arch/alpha/compile/BETA alpha
Architecture: alpha
Machine: alpha
>Description:
compiling with options AUDIO_DEBUG=5 fails with:
cc -mno-fp-regs -mcpu=21164a -ffreestanding -mcpu=21164a -g -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wno-sign-compare -fno-zero-initialized-in-bss -Dalpha -I. -I../../../../arch -I../../../.. -nostdinc -DDIAGNOSTIC -DMSGBUFSIZE=1048576 -DUFS_DIRHASH -DLKM -DAUDIO_DEBUG=5 -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I../../../../dist/ipf -c ../../../../dev/tc/bba.c
../../../../dev/tc/bba.c: In function `bba_allocm':
../../../../dev/tc/bba.c:303: warning: int format, different type arg (arg 2)
../../../../dev/tc/bba.c: In function `bba_round_buffersize':
../../../../dev/tc/bba.c:376: warning: int format, different type arg (arg 2)
*** Error code 1

Stop.
make: stopped in /usr/src/sys/arch/alpha/compile/BETA

>How-To-Repeat:
try to compile an alpha kernel (pmax maybe too) with AUDIO_DEBUG.
>Fix:
Index: src/sys/dev/tc/bba.c
===================================================================
RCS file: /home/pavel/cvs/src/sys/dev/tc/bba.c,v
retrieving revision 1.24
diff -u -r1.24 bba.c
--- src/sys/dev/tc/bba.c	15 Jan 2005 15:19:53 -0000	1.24
+++ src/sys/dev/tc/bba.c	7 Oct 2005 15:28:31 -0000
@@ -300,7 +300,7 @@
 	int w;
 	int state;
 
-	DPRINTF(("bba_allocm: size = %d\n", size));
+	DPRINTF(("bba_allocm: size = %zd\n", size));
 	asc = addr;
 	sc = addr;
 	state = 0;
@@ -373,7 +373,7 @@
 bba_round_buffersize(void *addr, int direction, size_t size)
 {
 
-	DPRINTF(("bba_round_buffersize: size=%d\n", size));
+	DPRINTF(("bba_round_buffersize: size=%zd\n", size));
 	return size > BBA_DMABUF_SIZE ? BBA_DMABUF_SIZE :
 	    roundup(size, IOASIC_DMA_BLOCKSIZE);
 }