Subject: SIOP_DEBUG causes failure to compile
To: NetBSD Current Users <current-users@NetBSD.org>
From: Chris Ross <cross+netbsd@distal.com>
List: current-users
Date: 10/02/2007 12:21:55
--Apple-Mail-32-434034145
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
delsp=yes;
format=flowed
This is [assumedly] an old bug, and one people don't see often.
But, if you turn on SIOP_DEBUG for a kernel config, and try to build
a config with an esiop device in it, it will fail to build saying:
cc1: warnings being treated as errors
/data/NetBSD/src/sys/dev/ic/esiop.c: In function 'esiop_timeout':
/data/NetBSD/src/sys/dev/ic/esiop.c:1849: warning: value computed is
not used
The following patch allows this to compile, but I'd appreciate
someone knowing more about the code there checking to make sure that
this is a reasonable fix...
Thanks!
- Chris
--Apple-Mail-32-434034145
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
x-unix-mode=0644;
name=esiop.diff
Content-Disposition: attachment;
filename=esiop.diff
Index: sys/dev/ic/esiop.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/esiop.c,v
retrieving revision 1.40
diff -u -r1.40 esiop.c
--- sys/dev/ic/esiop.c 30 Sep 2007 11:59:41 -0000 1.40
+++ sys/dev/ic/esiop.c 2 Oct 2007 16:18:48 -0000
@@ -1846,7 +1846,7 @@
printf("DSP 0x%lx DSA 0x%x\n",
(u_long)(bus_space_read_4(sc->sc_c.sc_rt, sc->sc_c.sc_rh, SIOP_DSP) - sc->sc_c.sc_scriptaddr),
bus_space_read_4(sc->sc_c.sc_rt, sc->sc_c.sc_rh, SIOP_DSA));
- bus_space_read_1(sc->sc_c.sc_rt, sc->sc_c.sc_rh, SIOP_CTEST2);
+ (void)bus_space_read_1(sc->sc_c.sc_rt, sc->sc_c.sc_rh, SIOP_CTEST2);
printf("istat 0x%x\n", bus_space_read_1(sc->sc_c.sc_rt, sc->sc_c.sc_rh, SIOP_ISTAT));
#else
printf("command timeout, CDB: ");
--Apple-Mail-32-434034145--