kern: physmem: properly cast %jx arguments to uintmax_t
While we're here, slap prfunc with a __printflike to get compiler checking on args to catch silly mistakes like this. Reported by: jrtc27
This commit is contained in:
parent
d481dcee72
commit
7b5cb32fca
@ -120,7 +120,7 @@ panic(const char *fmt, ...)
|
||||
* db_printf).
|
||||
*/
|
||||
static void
|
||||
physmem_dump_tables(int (*prfunc)(const char *, ...))
|
||||
physmem_dump_tables(int (*prfunc)(const char *, ...) __printflike(1, 2))
|
||||
{
|
||||
size_t i;
|
||||
int flags;
|
||||
@ -149,10 +149,12 @@ physmem_dump_tables(int (*prfunc)(const char *, ...))
|
||||
#ifdef DEBUG
|
||||
prfunc("Avail lists:\n");
|
||||
for (i = 0; phys_avail[i] != 0; ++i) {
|
||||
prfunc(" phys_avail[%d] 0x%08jx\n", i, phys_avail[i]);
|
||||
prfunc(" phys_avail[%d] 0x%08jx\n", i,
|
||||
(uintmax_t)phys_avail[i]);
|
||||
}
|
||||
for (i = 0; dump_avail[i] != 0; ++i) {
|
||||
prfunc(" dump_avail[%d] 0x%08jx\n", i, dump_avail[i]);
|
||||
prfunc(" dump_avail[%d] 0x%08jx\n", i,
|
||||
(uintmax_t)dump_avail[i]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user