Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Jan 2017 00:41:30 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r311464 - head/sys/mips/mips
Message-ID:  <201701060041.v060fUOb077973@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701060041.v060fUOb077973>