diff options
author | julian <julian@FreeBSD.org> | 2002-02-27 09:16:00 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2002-02-27 09:16:00 +0000 |
commit | fddda3307dd74c84941a41b9226b67ad3a2f1a99 (patch) | |
tree | 55c4a16c2cbab0c4e6582de3df6f87ca6ae41b8e /sys/dev/usb/ohci.c | |
parent | 3df0f7614526bf04b83f28add384b66ef295b55b (diff) | |
download | FreeBSD-src-fddda3307dd74c84941a41b9226b67ad3a2f1a99.zip FreeBSD-src-fddda3307dd74c84941a41b9226b67ad3a2f1a99.tar.gz |
Fix warnings that have become fatal
1/ conditionalise (#if 0) function that is not used.
Unused code left in place for netBSD compatibility.
2/ Recode loop to convince gcc that it does initialise a variable
(use do-while instead of for() so gcc knows that we always go through
at least once. Feel free to check my logic.
Diffstat (limited to 'sys/dev/usb/ohci.c')
-rw-r--r-- | sys/dev/usb/ohci.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 9ad8ee9..369f246 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1050,9 +1050,12 @@ ohci_intr1(ohci_softc_t *sc) ohci_physaddr_t ldone; ohci_soft_td_t *std; - for (ldone = sc->sc_done; ldone != 0; - ldone = le32toh(std->td.td_nexttd)) - std = ohci_hash_find_td(sc, ldone); + ldone = sc->sc_done; /* always non 0 */ + do { + std = ohci_hash_find_td(sc, ldone); + ldone = le32toh(std->td.td_nexttd); + } while (ldone != 0); + std->td.td_nexttd = le32toh(done); } sc->sc_hcca->hcca_done_head = 0; |