summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorjohan <johan@FreeBSD.org>2003-04-23 20:24:13 +0000
committerjohan <johan@FreeBSD.org>2003-04-23 20:24:13 +0000
commit1bab2ea14bce7c41fef810da80553f9bad0a1ceb (patch)
treedcaaf96897d8315a34493ecd6d2b22323211ef49 /sbin
parente567096f00665eae1d9d822e31586e404d8cdb91 (diff)
downloadFreeBSD-src-1bab2ea14bce7c41fef810da80553f9bad0a1ceb.zip
FreeBSD-src-1bab2ea14bce7c41fef810da80553f9bad0a1ceb.tar.gz
Make this WARNS=5 clean by using %j and (uintmax_t).
Look at by: sebastian.ssmoller@web.de on audit@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/kldstat/Makefile2
-rw-r--r--sbin/kldstat/kldstat.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/sbin/kldstat/Makefile b/sbin/kldstat/Makefile
index 6380a27..b602a3e 100644
--- a/sbin/kldstat/Makefile
+++ b/sbin/kldstat/Makefile
@@ -27,7 +27,7 @@
#
PROG= kldstat
-WARNS= 0
MAN= kldstat.8
+WARNS?= 5
.include <bsd.prog.mk>
diff --git a/sbin/kldstat/kldstat.c b/sbin/kldstat/kldstat.c
index 58c5388..3e1adee 100644
--- a/sbin/kldstat/kldstat.c
+++ b/sbin/kldstat/kldstat.c
@@ -30,6 +30,7 @@ static const char rcsid[] =
#endif /* not lint */
#include <err.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -65,8 +66,9 @@ static void printfile(int fileid, int verbose)
if (kldstat(fileid, &stat) < 0)
warn("can't stat file id %d", fileid);
else
- printf("%2d %4d %p %-8x %s\n",
- stat.id, stat.refs, stat.address, stat.size, stat.name);
+ printf("%2d %4d %p %-8jx %s\n",
+ stat.id, stat.refs, stat.address, (uintmax_t)stat.size,
+ stat.name);
if (verbose) {
printf("\tContains modules:\n");
OpenPOWER on IntegriCloud