From 661e18c98539f151b48f542faade2dba5ac78f09 Mon Sep 17 00:00:00 2001 From: dim Date: Sat, 31 Dec 2011 18:53:11 +0000 Subject: [PATCH 40/65] MFC r228580: In cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c, some uint64_t values are snprintf'd using %llx. On amd64, uint64_t is typedef'd as unsigned long, so cast the values to u_longlong_t, as is done similarly in the rest of the file. git-svn-id: http://svn.freebsd.org/base/stable/9@229134 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f (cherry picked from commit 44d365bab6d101ab5b7f4e7927566c16bac1e448) Signed-off-by: Xin Li --- .../opensolaris/lib/libdtrace/common/dt_handle.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c index ea039e9..fe1ec7a 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c @@ -335,7 +335,8 @@ dt_handle_cpudrop(dtrace_hdl_t *dtp, processorid_t cpu, } (void) snprintf(s, size, "%llu %sdrop%s on CPU %d\n", - howmany, what == DTRACEDROP_PRINCIPAL ? "" : "aggregation ", + (u_longlong_t)howmany, + what == DTRACEDROP_PRINCIPAL ? "" : "aggregation ", howmany > 1 ? "s" : "", cpu); if (dtp->dt_drophdlr == NULL) @@ -427,7 +428,8 @@ dt_handle_status(dtrace_hdl_t *dtp, dtrace_status_t *old, dtrace_status_t *new) size = sizeof (str); } - (void) snprintf(s, size, "%llu %s%s%s\n", nval - oval, + (void) snprintf(s, size, "%llu %s%s%s\n", + (u_longlong_t)(nval - oval), _dt_droptab[i].dtdrt_str, (nval - oval > 1) ? "s" : "", _dt_droptab[i].dtdrt_msg != NULL ? _dt_droptab[i].dtdrt_msg : ""); -- 1.7.8.3