Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/modstat Keep printf() happy - cast the max name length ...



details:   https://anonhg.NetBSD.org/src/rev/fcc189bbd82c
branches:  trunk
changeset: 765713:fcc189bbd82c
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Fri Jun 03 16:35:35 2011 +0000

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

diffstat:

 sbin/modstat/main.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (39 lines):

diff -r 9eca96c372c5 -r fcc189bbd82c sbin/modstat/main.c
--- a/sbin/modstat/main.c       Fri Jun 03 16:28:40 2011 +0000
+++ b/sbin/modstat/main.c       Fri Jun 03 16:35:35 2011 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index