diff options
author | marcel <marcel@FreeBSD.org> | 2004-08-30 03:11:46 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2004-08-30 03:11:46 +0000 |
commit | 1cb404fad9d7569c676833f82ad33eb6bb1aefb9 (patch) | |
tree | 28d563dcfc3b45041edd28791e9a3a413eba1b4a | |
parent | 130af57ccdc9c37a8165cd228360dd4c799b1f7f (diff) | |
download | FreeBSD-src-1cb404fad9d7569c676833f82ad33eb6bb1aefb9.zip FreeBSD-src-1cb404fad9d7569c676833f82ad33eb6bb1aefb9.tar.gz |
Improve 64-bit cleanliness: make sure to use long format specifiers for
long arguments. This is WARNS=2 clean now.
-rw-r--r-- | usr.sbin/kgmon/kgmon.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.sbin/kgmon/kgmon.c b/usr.sbin/kgmon/kgmon.c index 893e693..05d478a 100644 --- a/usr.sbin/kgmon/kgmon.c +++ b/usr.sbin/kgmon/kgmon.c @@ -393,8 +393,8 @@ dumpstate(kvp) i = 0; } if (i != kvp->gpm.kcountsize) - errx(6, "read ticks: read %u, got %d: %s", - kvp->gpm.kcountsize, i, + errx(6, "read ticks: read %lu, got %ld: %s", + kvp->gpm.kcountsize, (long)i, kflag ? kvm_geterr(kvp->kd) : strerror(errno)); if ((fwrite(tickbuf, kvp->gpm.kcountsize, 1, fp)) != 1) err(7, "writing tocks to gmon.out"); @@ -415,8 +415,8 @@ dumpstate(kvp) i = 0; } if (i != kvp->gpm.fromssize) - errx(9, "read froms: read %u, got %d: %s", - kvp->gpm.fromssize, i, + errx(9, "read froms: read %lu, got %ld: %s", + kvp->gpm.fromssize, (long)i, kflag ? kvm_geterr(kvp->kd) : strerror(errno)); if ((tos = (struct tostruct *)malloc(kvp->gpm.tossize)) == NULL) errx(10, "cannot allocate tos space"); @@ -430,12 +430,12 @@ dumpstate(kvp) i = 0; } if (i != kvp->gpm.tossize) - errx(11, "read tos: read %u, got %d: %s", - kvp->gpm.tossize, i, + errx(11, "read tos: read %lu, got %ld: %s", + kvp->gpm.tossize, (long)i, kflag ? kvm_geterr(kvp->kd) : strerror(errno)); if (debug) - warnx("lowpc 0x%x, textsize 0x%x", - kvp->gpm.lowpc, kvp->gpm.textsize); + warnx("lowpc 0x%lx, textsize 0x%lx", + (unsigned long)kvp->gpm.lowpc, kvp->gpm.textsize); endfrom = kvp->gpm.fromssize / sizeof(*froms); for (fromindex = 0; fromindex < endfrom; ++fromindex) { if (froms[fromindex] == 0) @@ -443,11 +443,11 @@ dumpstate(kvp) frompc = (u_long)kvp->gpm.lowpc + (fromindex * kvp->gpm.hashfraction * sizeof(*froms)); for (toindex = froms[fromindex]; toindex != 0; - toindex = tos[toindex].link) { + toindex = tos[toindex].link) { if (debug) - warnx("[mcleanup] frompc 0x%x selfpc 0x%x count %d", - frompc, tos[toindex].selfpc, - tos[toindex].count); + warnx("[mcleanup] frompc 0x%lx selfpc 0x%lx " + "count %ld", frompc, tos[toindex].selfpc, + tos[toindex].count); rawarc.raw_frompc = frompc; rawarc.raw_selfpc = (u_long)tos[toindex].selfpc; rawarc.raw_count = tos[toindex].count; |