Subject: kern/2851: Kernel with AUDIO_DEBUG doesn't compile
To: None <gnats-bugs@gnats.netbsd.org>
From: Dave Huang <khym@bga.com>
List: netbsd-bugs
Date: 10/15/1996 21:21:23
>Number:         2851
>Category:       kern
>Synopsis:       Kernel with AUDIO_DEBUG doesn't compile
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 15 19:35:01 1996
>Last-Modified:
>Originator:     Dave Huang
>Organization:
Name: Dave Huang     |   Mammal, mammal / their names are called /
INet: khym@bga.com   |   they raise a paw / the bat, the cat /
FurryMUCK: Dahan     |   dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 20 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++
>Release:        October 15, 1996
>Environment:
	
System: NetBSD apm2-120.realtime.net 1.2A NetBSD 1.2A (SPIFF) #49: Tue Oct 15 20:23:54 CDT 1996 khym@apm2-107.realtime.net:/usr/src/sys/arch/i386/compile/SPIFF i386


>Description:
Trying to compile a kernel with AUDIO_DEBUG defined will give this error:

cc1: warnings being treated as errors
../../../../dev/audio.c:97: warning: no previous prototype for `Dprintf'
*** Error code 1

And if you also have the Sound Blaster driver, you get this error too:

cc1: warnings being treated as errors
../../../../dev/isa/sbdsp.c: In function `sb_printsc':
../../../../dev/isa/sbdsp.c:147: warning: int format, long int arg (arg 5)
../../../../dev/isa/sbdsp.c:149: warning: unsigned int format, pointer arg (arg 4)
../../../../dev/isa/sbdsp.c:149: warning: unsigned int format, pointer arg (arg 5)
*** Error code 1

There may be similar problems with drivers for other sound cards.

>How-To-Repeat:

>Fix:
--- /usr/src/sys/dev/audio.c	Mon Oct 14 11:32:48 1996
+++ audio.c	Tue Oct 15 02:12:57 1996
@@ -87,6 +87,8 @@
 #ifdef AUDIO_DEBUG
 #include <machine/stdarg.h>
 
+void Dprintf __P((const char *fmt, ...));
+
 void
 #ifdef __STDC__
 Dprintf(const char *fmt, ...)

--- /usr/src/sys/dev/isa/sbdsp.c	Mon Oct 14 11:36:30 1996
+++ sbdsp.c	Tue Oct 15 02:25:49 1996
@@ -143,9 +143,9 @@
 	printf("irate %d itc %d imode %d orate %d otc %d omode %d encoding %x\n",
 	    sc->sc_irate, sc->sc_itc, sc->sc_imode,
 	    sc->sc_orate, sc->sc_otc, sc->sc_omode, sc->encoding);
-	printf("outport %d inport %d spkron %d nintr %d\n",
+	printf("outport %d inport %d spkron %d nintr %lu\n",
 	    sc->out_port, sc->in_port, sc->spkr_state, sc->sc_interrupts);
-	printf("precision %d channels %d intr %x arg %x\n",
+	printf("precision %d channels %d intr %p arg %p\n",
 	    sc->sc_precision, sc->sc_channels, sc->sc_intr, sc->sc_arg);
 	printf("gain: ");
 	for (i = 0; i < SB_NDEVS; i++)
>Audit-Trail:
>Unformatted: