NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-vax/49935: missing break in vsbus.c

>Number:         49935
>Category:       port-vax
>Synopsis:       missing break in vsbus.c
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-vax-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 30 19:00:00 +0000 2015
>Originator:     Felix Deichmann
>Release:        7.0_BETA
7.0_BETA (GENERIC.201505300950Z) vax
A switch case in vsbus.c for VS4000/60 and VS4000/VLC is probably missing a break (or, less probable, not documenting a fall-through).

The case above for VAX49 and VAX53 it is very similar and *has* a break statement.

Looking at the changes by revision 1.23 -> 1.24 of vsbus.c, it is quite obvious that refactoring introduced ambiguity, although the following default case contained only statements with the same effect.
But in later revisions more and differing code was added to the default case...

Without extensively testing it, an affected machine (VS4000/60) seems to be fine with and without the break statement though.
--- vsbus.c.rev1.60	Sat May 30 20:50:45 2015
+++ vsbus.c	Sat May 30 20:52:08 2015
@@ -138,6 +138,7 @@
 		sc->sc_intclr = (char *)sc->sc_vsregs + 15;
 		sc->sc_intmsk = (char *)sc->sc_vsregs + 12;
 		vsbus_dma_init(sc, 32768);
+		break;

Home | Main Index | Thread Index | Old Index