svn commit: r229133 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common

Dimitry Andric dim at FreeBSD.org
Sat Dec 31 18:49:46 UTC 2011


Author: dim
Date: Sat Dec 31 18:49:46 2011
New Revision: 229133
URL: http://svn.freebsd.org/changeset/base/229133

Log:
  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.

Modified:
  stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c
Directory Properties:
  stable/9/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c
==============================================================================
--- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c	Sat Dec 31 18:41:29 2011	(r229132)
+++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c	Sat Dec 31 18:49:46 2011	(r229133)
@@ -873,7 +873,7 @@ dt_print_stack(dtrace_hdl_t *dtp, FILE *
 			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 *
 			 */
 			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);
 			}
 		}
 


More information about the svn-src-stable-9 mailing list