Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/tprof fix build error of printf format
details: https://anonhg.NetBSD.org/src/rev/25a85e89bb04
branches: trunk
changeset: 372485:25a85e89bb04
user: ryo <ryo%NetBSD.org@localhost>
date: Thu Dec 01 03:32:24 2022 +0000
description:
fix build error of printf format
diffstat:
usr.sbin/tprof/tprof_top.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (40 lines):
diff -r fa9bd8e75b92 -r 25a85e89bb04 usr.sbin/tprof/tprof_top.c
--- a/usr.sbin/tprof/tprof_top.c Thu Dec 01 02:29:37 2022 +0000
+++ b/usr.sbin/tprof/tprof_top.c Thu Dec 01 03:32:24 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tprof_top.c,v 1.1 2022/12/01 00:43:27 ryo Exp $ */
+/* $NetBSD: tprof_top.c,v 1.2 2022/12/01 03:32:24 ryo Exp $ */
/*-
* Copyright (c) 2022 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: tprof_top.c,v 1.1 2022/12/01 00:43:27 ryo Exp $");
+__RCSID("$NetBSD: tprof_top.c,v 1.2 2022/12/01 03:32:24 ryo Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -387,7 +387,7 @@
printf("%5.2f%%", sample_nsample_per_event[i] *
100.00 / nsample_total);
}
- printf("%8lu ", sample_nsample_per_event[i]);
+ printf("%8"PRIu64" ", sample_nsample_per_event[i]);
printf("%-32.32s", eventname[i]);
for (n = 0; n < ncpu; n++) {
@@ -481,10 +481,10 @@
name = e->name;
if (name == NULL) {
if (e->flags & SAMPLE_ELM_FLAGS_USER) {
- snprintf(namebuf, sizeof(namebuf), "<PID:%lu>",
+ snprintf(namebuf, sizeof(namebuf), "<PID:%"PRIu64">",
e->addr);
} else {
- snprintf(namebuf, sizeof(namebuf), "0x%016lx",
+ snprintf(namebuf, sizeof(namebuf), "0x%016"PRIx64,
e->addr);
}
name = namebuf;
Home |
Main Index |
Thread Index |
Old Index