Subject: kern/37591: Kernel compiled with SIOP_DEBUG fails to build
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Chris Ross <cross+netbsd@distal.com>
List: netbsd-bugs
Date: 12/21/2007 19:55:00
>Number:         37591
>Category:       kern
>Synopsis:       Kernel compiled with SIOP_DEBUG fails to build
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 21 19:55:00 +0000 2007
>Originator:     Chris Ross
>Release:        current (4.99.43)
>Organization:
>Environment:
N/A (cross building on i386 for a sparc64 host - GENERIC kernel + "options  SIOP_DEBUG")
>Description:
When building a kernel with SIOP_DEBUG, and having an esiop driver in the kernel configuration file, the following compilation failure occurs:

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

>How-To-Repeat:
enable SIOP_DEBUG in a kernel that has esiop (or siop/osiop?) in it.  Try to build said kernel.
>Fix:
This fixes esiop, but siop and osiop might also need changes....
(tabs/spaces messed up on paste into bug on web form.   Sorry.)

Index: sys/dev/ic/esiop.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/esiop.c,v
retrieving revision 1.41
diff -u -r1.41 esiop.c
--- sys/dev/ic/esiop.c  19 Oct 2007 11:59:51 -0000      1.41
+++ sys/dev/ic/esiop.c  21 Dec 2007 19:01:06 -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: ");