diff options
author | delphij <delphij@FreeBSD.org> | 2005-01-08 15:46:06 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2005-01-08 15:46:06 +0000 |
commit | 049c85627c463b094dc6fafd968dac0fc27d2d36 (patch) | |
tree | e7b7f4702f5752e13e6128d82e58a62e3c2805f7 /usr.sbin/fdread/fdutil.c | |
parent | 99669f6c435eaf7942060ee1fa6c2da7de5a85d6 (diff) | |
download | FreeBSD-src-049c85627c463b094dc6fafd968dac0fc27d2d36.zip FreeBSD-src-049c85627c463b094dc6fafd968dac0fc27d2d36.tar.gz |
Cleanup usr.sbin/fd* so they can compile under WARNS=6.
fdcontrol/fdcontrol.c:
- Add const constraint to an intermediate value
which is not supposed to be changed elsewhere.
fdread/fdread.c:
- Use _devname in favor of devname to avoid name
conflicit.
- -1 is less than any positive number so in order
to get the block to function, we should get the
block a little earlier.
- Cast to remove signed when we are sure that a
return value is positive, or is compared with
an positive number (tracknumber of a floppy
disk is not likely to have UINT_MAX/2 anyway)
fdread/fdutil.c:
- Use more specific initializer
fdwrite/fdwrite.c:
- Use static on format_track since it's not
referenced in other places.
- Use const char* to represent string constant.
Bump WARNS accordingly.
Diffstat (limited to 'usr.sbin/fdread/fdutil.c')
-rw-r--r-- | usr.sbin/fdread/fdutil.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/fdread/fdutil.c b/usr.sbin/fdread/fdutil.c index 1f6617f..c1f4d8f 100644 --- a/usr.sbin/fdread/fdutil.c +++ b/usr.sbin/fdread/fdutil.c @@ -102,7 +102,7 @@ static struct fd_type fd_types_288m[] = { { FDF_3_820 }, { FDF_3_800 }, { FDF_3_720 }, - { 0 } + { 0,0,0,0,0,0,0,0,0,0,0,0 } }; static struct fd_type fd_types_144m[] = { @@ -126,7 +126,7 @@ static struct fd_type fd_types_144m[] = { { FDF_3_1480 }, { FDF_3_1640 }, #endif - { 0 } + { 0,0,0,0,0,0,0,0,0,0,0,0 } #else { FDF_3_1722 }, { FDF_3_1476 }, @@ -135,7 +135,7 @@ static struct fd_type fd_types_144m[] = { { FDF_3_820 }, { FDF_3_800 }, { FDF_3_720 }, - { 0 } + { 0,0,0,0,0,0,0,0,0,0,0,0 } #endif }; @@ -153,7 +153,7 @@ static struct fd_type fd_types_12m[] = { #if 0 { FDF_5_1280 }, #endif - { 0 } + { 0,0,0,0,0,0,0,0,0,0,0,0 } #else { FDF_5_1200 }, { FDF_5_1230 }, @@ -164,20 +164,20 @@ static struct fd_type fd_types_12m[] = { { FDF_5_720 }, { FDF_5_360 | FL_2STEP }, { FDF_5_640 }, - { 0 } + { 0,0,0,0,0,0,0,0,0,0,0,0 } #endif }; static struct fd_type fd_types_720k[] = { { FDF_3_720 }, - { 0 } + { 0,0,0,0,0,0,0,0,0,0,0,0 } }; static struct fd_type fd_types_360k[] = { { FDF_5_360 }, - { 0 } + { 0,0,0,0,0,0,0,0,0,0,0,0 } }; |