Subject: kern/31141: -current kernel compilation failure with COM_DEBUG
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <njoly@pasteur.fr>
List: netbsd-bugs
Date: 09/04/2005 08:16:00
>Number: 31141
>Category: kern
>Synopsis: -current kernel compilation failure with COM_DEBUG
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Sep 04 08:16:00 +0000 2005
>Originator: Nicolas Joly
>Release: NetBSD 3.99.8
>Organization:
Institut Pasteur, Paris.
>Environment:
System: NetBSD cixy.dial.pasteur.fr 3.99.8 NetBSD 3.99.8 (CIXY) #15: Fri Sep 2 08:10:50 CEST 2005 njoly@cixy.dial.pasteur.fr:/local/src/NetBSD/obj/i386/sys/arch/i386/compile/CIXY i386
Architecture: i386
Machine: i386
>Description:
I just noticed that a kernel with COM_DEBUG option set won't compile:
--- com.o ---
/local/src/NetBSD/src/sys/dev/ic/com.c: In function `comopen':
/local/src/NetBSD/src/sys/dev/ic/com.c:936: warning: passing arg 2 of `comstatus' discards qualifiers from pointer target type
/local/src/NetBSD/src/sys/dev/ic/com.c: In function `comioctl':
/local/src/NetBSD/src/sys/dev/ic/com.c:1225: warning: passing arg 2 of `comstatus' discards qualifiers from pointer target type
/local/src/NetBSD/src/sys/dev/ic/com.c: In function `comparam':
/local/src/NetBSD/src/sys/dev/ic/com.c:1564: warning: passing arg 2 of `comstatus' discards qualifiers from pointer target type
/local/src/NetBSD/src/sys/dev/ic/com.c: In function `com_stsoft':
/local/src/NetBSD/src/sys/dev/ic/com.c:1968: warning: passing arg 2 of `comstatus' discards qualifiers from pointer target type
/local/src/NetBSD/src/sys/dev/ic/com.c: In function `comintr':
/local/src/NetBSD/src/sys/dev/ic/com.c:2217: warning: passing arg 2 of `comstatus' discards qualifiers from pointer target type
*** [com.o] Error code 1
1 error
>How-To-Repeat:
Try to compile a kernel with COM_DEBUG
>Fix:
Index: sys/dev/ic/com.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/com.c,v
retrieving revision 1.234
diff -u -r1.234 com.c
--- sys/dev/ic/com.c 21 Jun 2005 14:01:11 -0000 1.234
+++ sys/dev/ic/com.c 4 Sep 2005 08:09:02 -0000
@@ -297,9 +297,9 @@
#ifdef COM_DEBUG
int com_debug = 0;
-void comstatus(struct com_softc *, char *);
+void comstatus(struct com_softc *, const char *);
void
-comstatus(struct com_softc *sc, char *str)
+comstatus(struct com_softc *sc, const char *str)
{
struct tty *tp = sc->sc_tty;