Module Name: src
Committed By: joerg
Date: Sat Mar 24 08:22:24 UTC 2012
Modified Files:
src/sbin/newfs_ext2fs: Makefile mke2fs.c
Log Message:
Avoid non-literal format string. Raise WARNS to 4 and disable
sign warnings instead.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sbin/newfs_ext2fs/Makefile
cvs rdiff -u -r1.15 -r1.16 src/sbin/newfs_ext2fs/mke2fs.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/newfs_ext2fs/Makefile
diff -u src/sbin/newfs_ext2fs/Makefile:1.3 src/sbin/newfs_ext2fs/Makefile:1.4
--- src/sbin/newfs_ext2fs/Makefile:1.3 Fri Jun 5 21:52:31 2009
+++ src/sbin/newfs_ext2fs/Makefile Sat Mar 24 08:22:24 2012
@@ -1,7 +1,9 @@
-# $NetBSD: Makefile,v 1.3 2009/06/05 21:52:31 haad Exp $
+# $NetBSD: Makefile,v 1.4 2012/03/24 08:22:24 joerg Exp $
# @(#)Makefile 8.2 (Berkeley) 3/27/94
-WARNS?= 3 # XXX: sign-compare issues
+WARNS?= 4
+
+CWARNFLAGS+= -Wno-sign-compare
.include <bsd.own.mk>
Index: src/sbin/newfs_ext2fs/mke2fs.c
diff -u src/sbin/newfs_ext2fs/mke2fs.c:1.15 src/sbin/newfs_ext2fs/mke2fs.c:1.16
--- src/sbin/newfs_ext2fs/mke2fs.c:1.15 Tue Mar 6 15:39:41 2012
+++ src/sbin/newfs_ext2fs/mke2fs.c Sat Mar 24 08:22:24 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: mke2fs.c,v 1.15 2012/03/06 15:39:41 tsutsui Exp $ */
+/* $NetBSD: mke2fs.c,v 1.16 2012/03/24 08:22:24 joerg Exp $ */
/*-
* Copyright (c) 2007 Izumi Tsutsui. All rights reserved.
@@ -100,7 +100,7 @@
#if 0
static char sccsid[] = "@(#)mkfs.c 8.11 (Berkeley) 5/3/95";
#else
-__RCSID("$NetBSD: mke2fs.c,v 1.15 2012/03/06 15:39:41 tsutsui Exp $");
+__RCSID("$NetBSD: mke2fs.c,v 1.16 2012/03/24 08:22:24 joerg Exp $");
#endif
#endif /* not lint */
@@ -626,7 +626,7 @@ mke2fs(const char *fsys, int fi, int fo)
continue;
}
/* Print superblock numbers */
- len = printf(" %*" PRIu64 "," + !col, fld_width,
+ len = printf("%s%*" PRIu64 ",", (col ? " " : ""), fld_width,
(uint64_t)cgbase(&sblock, cylno));
col += len;
if (col + len < max_cols)