Module Name:    src
Committed By:   pgoyette
Date:           Fri Jun  3 16:35:35 UTC 2011

Modified Files:
        src/sbin/modstat: main.c

Log Message:
Keep printf() happy - cast the max name length to type int


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sbin/modstat/main.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/modstat/main.c
diff -u src/sbin/modstat/main.c:1.12 src/sbin/modstat/main.c:1.13
--- src/sbin/modstat/main.c:1.12	Fri Jun  3 15:34:46 2011
+++ src/sbin/modstat/main.c	Fri Jun  3 16:35:35 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.12 2011/06/03 15:34:46 nonaka Exp $	*/
+/*	$NetBSD: main.c,v 1.13 2011/06/03 16:35:35 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: main.c,v 1.12 2011/06/03 15:34:46 nonaka Exp $");
+__RCSID("$NetBSD: main.c,v 1.13 2011/06/03 16:35:35 pgoyette Exp $");
 #endif /* !lint */
 
 #include <sys/module.h>
@@ -115,7 +115,8 @@
 			maxnamelen = namelen;
 	}
 	printf("%-*s %-10s %-10s %-5s %-8s %s\n",
-	    maxnamelen, "NAME", "CLASS", "SOURCE", "REFS", "SIZE", "REQUIRES");
+	    (int)maxnamelen, "NAME", "CLASS", "SOURCE", "REFS", "SIZE",
+	    "REQUIRES");
 	for (ms = iov.iov_base; len != 0; ms++, len--) {
 		const char *class;
 		const char *source;
@@ -143,8 +144,8 @@
 			source = "UNKNOWN";
 
 		printf("%-*s %-10s %-10s %-5d %-8s %s\n",
-		    maxnamelen, ms->ms_name, class, source, ms->ms_refcnt, sbuf,
-		    ms->ms_required);
+		    (int)maxnamelen, ms->ms_name, class, source, ms->ms_refcnt,
+		    sbuf, ms->ms_required);
 	}
 
 	exit(EXIT_SUCCESS);

Reply via email to