diff options
author | bde <bde@FreeBSD.org> | 1995-03-16 18:17:34 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-03-16 18:17:34 +0000 |
commit | 289f11acb49b6dbb3081e09bf94a86f008f55814 (patch) | |
tree | e4952f18ac85eccbbd3d9b0f010098732d07fe6d /sys/dev/fdc | |
parent | 4c4945abee9eabe3a2be340ba973ae861c21a3c6 (diff) | |
download | FreeBSD-src-289f11acb49b6dbb3081e09bf94a86f008f55814.zip FreeBSD-src-289f11acb49b6dbb3081e09bf94a86f008f55814.tar.gz |
Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
(except in netccitt, netiso and netns) and most of the warnings from
`gcc -Wnested-externs'. Fix all the bugs found. There were no serious
ones.
Diffstat (limited to 'sys/dev/fdc')
-rw-r--r-- | sys/dev/fdc/fdc.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 94b0329..6ab787b 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -43,7 +43,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.52 1995/02/26 01:37:51 bde Exp $ + * $Id: fd.c,v 1.53 1995/03/12 22:40:56 joerg Exp $ * */ @@ -289,6 +289,7 @@ static timeout_t fd_turnoff; static timeout_t fd_motor_on; static void fd_turnon(fdu_t); static void fdc_reset(fdc_p); +static int fd_in(fdcu_t, int *); static void fdstart(fdcu_t); static timeout_t fd_timeout; static timeout_t fd_pseudointr; @@ -477,9 +478,19 @@ int fd_read_status(fdc_p fdc, int fdsu) { int i, ret; + for (i = 0; i < 7; i++) { - if ((ret = fd_in(fdc->fdcu, fdc->status + i))) + /* + * XXX types are poorly chosen. Only bytes can by read + * from the hardware, but fdc_status wants u_longs and + * fd_in() gives ints. + */ + int status; + + ret = fd_in(fdc->fdcu, &status); + fdc->status[i] = status; + if (ret != 0) break; } @@ -854,7 +865,7 @@ in_fdc(fdcu_t fdcu) /* * fd_in: Like in_fdc, but allows you to see if it worked. */ -int +static int fd_in(fdcu_t fdcu, int *ptr) { int baseport = fdc_data[fdcu].baseport; |