svn commit: r311464 - head/sys/mips/mips

John Baldwin jhb at FreeBSD.org
Fri Jan 6 00:41:31 UTC 2017


Author: jhb
Date: Fri Jan  6 00:41:30 2017
New Revision: 311464
URL: https://svnweb.freebsd.org/changeset/base/311464

Log:
  Add uintmax_t casts to silence printf format warnings.
  
  The format strings weren't checked when stacksave_subr() used a function
  pointer for printf instead of directly using db_printf().
  
  Reported by:	kib
  Sponsored by:	DARPA / AFRL

Modified:
  head/sys/mips/mips/db_trace.c

Modified: head/sys/mips/mips/db_trace.c
==============================================================================
--- head/sys/mips/mips/db_trace.c	Fri Jan  6 00:07:36 2017	(r311463)
+++ head/sys/mips/mips/db_trace.c	Fri Jan  6 00:41:30 2017	(r311464)
@@ -117,7 +117,7 @@ loop:
 
 	/* Check for bad SP: could foul up next frame. */
 	if (!MIPS_IS_VALID_KERNELADDR(sp)) {
-		db_printf("SP 0x%jx: not in kernel\n", sp);
+		db_printf("SP 0x%jx: not in kernel\n", (uintmax_t)sp);
 		ra = 0;
 		subr = 0;
 		goto done;
@@ -162,7 +162,7 @@ loop:
 
 	/* Check for bad PC. */
 	if (!MIPS_IS_VALID_KERNELADDR(pc)) {
-		db_printf("PC 0x%jx: not in kernel\n", pc);
+		db_printf("PC 0x%jx: not in kernel\n", (uintmax_t)pc);
 		ra = 0;
 		goto done;
 	}


More information about the svn-src-all mailing list