Module Name: src
Committed By: lukem
Date: Sun Apr 12 02:53:56 UTC 2009
Modified Files:
src/usr.bin/fdformat: Makefile fdformat.c
Log Message:
fix -Wsign-compare issues
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/fdformat/Makefile
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/fdformat/fdformat.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/fdformat/Makefile
diff -u src/usr.bin/fdformat/Makefile:1.11 src/usr.bin/fdformat/Makefile:1.12
--- src/usr.bin/fdformat/Makefile:1.11 Sun Mar 8 15:37:12 2009
+++ src/usr.bin/fdformat/Makefile Sun Apr 12 02:53:56 2009
@@ -1,6 +1,5 @@
-# $NetBSD: Makefile,v 1.11 2009/03/08 15:37:12 he Exp $
+# $NetBSD: Makefile,v 1.12 2009/04/12 02:53:56 lukem Exp $
-WARNS=3
.if (${MACHINE_ARCH} == "alpha" || \
${MACHINE_ARCH} == "arm" || \
${MACHINE_ARCH} == "armeb" || \
Index: src/usr.bin/fdformat/fdformat.c
diff -u src/usr.bin/fdformat/fdformat.c:1.15 src/usr.bin/fdformat/fdformat.c:1.16
--- src/usr.bin/fdformat/fdformat.c:1.15 Mon Apr 28 20:24:12 2008
+++ src/usr.bin/fdformat/fdformat.c Sun Apr 12 02:53:56 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: fdformat.c,v 1.15 2008/04/28 20:24:12 martin Exp $ */
+/* $NetBSD: fdformat.c,v 1.16 2009/04/12 02:53:56 lukem Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: fdformat.c,v 1.15 2008/04/28 20:24:12 martin Exp $");
+__RCSID("$NetBSD: fdformat.c,v 1.16 2009/04/12 02:53:56 lukem Exp $");
#endif
#include <sys/types.h>
@@ -106,7 +106,7 @@
(void)printf("- SEEK ERROR\n");
return 1;
}
- if (read(fd, buf, tracksize) != tracksize) {
+ if ((size_t)read(fd, buf, tracksize) != tracksize) {
(void)printf("- VERIFY ERROR\n");
return 1;
}
@@ -286,9 +286,9 @@
}
cmd.formatcmd_version = FDFORMAT_VERSION;
- for (cyl = 0; cyl < parms.ncyl; cyl++) {
+ for (cyl = 0; (unsigned int)cyl < parms.ncyl; cyl++) {
cmd.cylinder = cyl;
- for (trk = 0; trk < parms.ntrk; trk++) {
+ for (trk = 0; (unsigned int)trk < parms.ntrk; trk++) {
cmd.head = trk;
(void)printf("\rFormatting track %i / head %i ", cyl, trk);
(void)fflush(stdout);