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
This commit is contained in:
parent
631f432b0d
commit
9f0968c616
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=311464
@ -117,7 +117,7 @@ stacktrace_subr(register_t pc, register_t sp, register_t ra)
|
||||
|
||||
/* 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 @@ stacktrace_subr(register_t pc, register_t sp, register_t ra)
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user