summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorCharles Longeau <chl@cvs.openbsd.org>2007-12-28 19:22:08 +0000
committerCharles Longeau <chl@cvs.openbsd.org>2007-12-28 19:22:08 +0000
commit31d64a1533818968346a66710cb39f993c68acbc (patch)
treef1b7aa58d8a10a43b5443a12e15f1561d92f4dea /usr.sbin
parent38e59237d6619f4e0ca14711f1f7983d2f291932 (diff)
printf field widths are always int, so add casts to remove
"warning: field width is not type int" "looks good" otto@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pstat/pstat.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index d7c10939292..58cbeeaa03c 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pstat.c,v 1.71 2007/12/08 18:23:24 deraadt Exp $ */
+/* $OpenBSD: pstat.c,v 1.72 2007/12/28 19:22:07 chl Exp $ */
/* $NetBSD: pstat.c,v 1.27 1996/10/23 22:50:06 cgd Exp $ */
/*-
@@ -40,7 +40,7 @@ static char copyright[] =
#if 0
from: static char sccsid[] = "@(#)pstat.c 8.9 (Berkeley) 2/16/94";
#else
-static char *rcsid = "$OpenBSD: pstat.c,v 1.71 2007/12/08 18:23:24 deraadt Exp $";
+static char *rcsid = "$OpenBSD: pstat.c,v 1.72 2007/12/28 19:22:07 chl Exp $";
#endif
#endif /* not lint */
@@ -395,7 +395,7 @@ vnodemode(void)
void
vnode_header(void)
{
- (void)printf("%*s TYP VFLAG USE HOLD", 2 * sizeof(long), "ADDR");
+ (void)printf("%*s TYP VFLAG USE HOLD", 2 * (int)sizeof(long), "ADDR");
}
void
@@ -459,7 +459,7 @@ vnode_print(struct vnode *avnode, struct vnode *vp)
if (flag == 0)
*fp++ = '-';
*fp = '\0';
- (void)printf("%0*lx %s %5s %4d %4u", 2 * sizeof(long),
+ (void)printf("%0*lx %s %5s %4d %4u", 2 * (int)sizeof(long),
(long)avnode, type, flags, vp->v_usecount, vp->v_holdcnt);
}
@@ -1033,12 +1033,12 @@ filemode(void)
(void)printf("%d/%d open files\n", nfile, maxfile);
(void)printf("%*s TYPE FLG CNT MSG %*s OFFSET\n",
- 2 * sizeof(long), "LOC", 2 * sizeof(long), "DATA");
+ 2 * (int)sizeof(long), "LOC", 2 * (int)sizeof(long), "DATA");
for (; (char *)ffp < buf + len; addr = LIST_NEXT(ffp, f_list), ffp++) {
memmove(&fp, ffp, sizeof fp);
if ((unsigned)fp.f_type > DTYPE_SOCKET)
continue;
- (void)printf("%0*lx ", 2 * sizeof(long), (long)addr);
+ (void)printf("%0*lx ", 2 * (int)sizeof(long), (long)addr);
(void)printf("%-8.8s", dtypes[fp.f_type]);
fbp = flagbuf;
if (fp.f_flag & FREAD)
@@ -1054,7 +1054,7 @@ filemode(void)
*fbp = '\0';
(void)printf("%6s %3ld", flagbuf, fp.f_count);
(void)printf(" %3ld", fp.f_msgcount);
- (void)printf(" %0*lx", 2 * sizeof(long), (long)fp.f_data);
+ (void)printf(" %0*lx", 2 * (int)sizeof(long), (long)fp.f_data);
if (fp.f_offset < 0)
(void)printf(" %llx\n", (long long)fp.f_offset);