From 282884efb9c09853a9bfaf1f9fc4e092d3f69044 Mon Sep 17 00:00:00 2001 From: dim Date: Sat, 31 Dec 2011 18:49:46 +0000 Subject: [PATCH 39/65] MFC r228579: In cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.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@229133 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f (cherry picked from commit 09b270a3517723e66cdccc343637bdb46814d439) Signed-off-by: Xin Li --- .../opensolaris/lib/libdtrace/common/dt_consume.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c index 911478e..af4af8a 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c @@ -873,7 +873,7 @@ dt_print_stack(dtrace_hdl_t *dtp, FILE *fp, const char *format, if (pc > sym.st_value) { (void) snprintf(c, sizeof (c), "%s`%s+0x%llx", dts.dts_object, dts.dts_name, - pc - sym.st_value); + (u_longlong_t)(pc - sym.st_value)); } else { (void) snprintf(c, sizeof (c), "%s`%s", dts.dts_object, dts.dts_name); @@ -886,9 +886,10 @@ dt_print_stack(dtrace_hdl_t *dtp, FILE *fp, const char *format, */ if (dtrace_lookup_by_addr(dtp, pc, NULL, &dts) == 0) { (void) snprintf(c, sizeof (c), "%s`0x%llx", - dts.dts_object, pc); + dts.dts_object, (u_longlong_t)pc); } else { - (void) snprintf(c, sizeof (c), "0x%llx", pc); + (void) snprintf(c, sizeof (c), "0x%llx", + (u_longlong_t)pc); } } -- 1.7.8.3