Subject: kern/17161: cannot compile ISDN w/o debug msgs
To: None <gnats-bugs@gnats.netbsd.org>
From: Christian Groessler <cpg@aladdin.de>
List: netbsd-bugs
Date: 06/03/2002 23:35:10
>Number:         17161
>Category:       kern
>Synopsis:       cannot compile ISDN w/o debug msgs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 04 01:10:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Christian Groessler
>Release:        NetBSD 1.6_BETA1
>Organization:
	
>Environment:
	
	
System: NetBSD gruftie 1.6_BETA1 NetBSD 1.6_BETA1 (GRUFTIE) #0: Mon Jun  3 22:52:26 CEST 2002     chris@power.cnet.aladdin.de:/local/netbsdsrc-1.6/src/sys/arch/i386/compile/GRUFTIE i386
Architecture: i386
Machine: i386
>Description:
	I added the line
options         DO_I4B_DEBUG=0
to my kernel configuration file to disable isdn debug messages.
However, the kernel won't compile then, the following error occurs:

--------------
/usr/local/tools/bin/i386--netbsdelf-gcc  -ffreestanding  -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wno-uninitialized  -Di386 -I.  -I../../../../arch -I../../../.. -nostdinc -DDO_I4B_DEBUG="0" -DIPR_VJ -DMAXUSERS=16 -D_KERNEL -D_KERNEL_OPT   -c /local/netbsdsrc-1.6/src/sys/arch/i386/compile/GRUFTIE/../../../../dev/ic/isic_l1fsm.c
cc1: warnings being treated as errors
/local/netbsdsrc-1.6/src/sys/arch/i386/compile/GRUFTIE/../../../../dev/ic/isic_l1fsm.c:97: warning: `event_text' defined but not used
*** Error code 1

Stop.
--------------

>How-To-Repeat:
	add an isdn driver (in my case
options         ISICISA_TEL_S0_16_3
isic0 at isa? port 0xd80 irq 12
and all isdn pseudo drivers) to your kernel config file, as well as
the line
options         DO_I4B_DEBUG=0

I used an i386 machine.

>Fix:
	I did the following simple thing to fix it:

-----------
--- isic_l1fsm.c        2002/05/21 10:31:12     1.5
+++ isic_l1fsm.c        2002/06/03 21:29:44
@@ -94,6 +94,7 @@
        "Illegal State"
 };
 
+#if DO_I4B_DEBUG > 0
 static char *event_text[N_EVENTS] = {
        "EV_PHAR PH_ACT_REQ",
        "EV_T3 Timer 3 expired",
@@ -108,6 +109,7 @@
        "EV_EI Error Ind",
        "Illegal Event"
 };
+#endif
 
 /* Function prototypes */
 
-----------
>Release-Note:
>Audit-Trail:
>Unformatted:
 	may-31-2002