From 049c85627c463b094dc6fafd968dac0fc27d2d36 Mon Sep 17 00:00:00 2001 From: delphij Date: Sat, 8 Jan 2005 15:46:06 +0000 Subject: 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. --- usr.sbin/fdformat/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.sbin/fdformat') diff --git a/usr.sbin/fdformat/Makefile b/usr.sbin/fdformat/Makefile index 40ca9a7..a172811 100644 --- a/usr.sbin/fdformat/Makefile +++ b/usr.sbin/fdformat/Makefile @@ -5,7 +5,7 @@ PROG= fdformat SRCS= fdformat.c fdutil.c -WARNS?= 2 +WARNS?= 6 CFLAGS+= -I${.CURDIR}/../fdread .if ${MACHINE} == "pc98" -- cgit v1.1