Fix format string warnings for platforms where

sizeof(db_addr_t) > sizeof(long). e.g. ILP32 on sh5.
This commit is contained in:
scw 2003-11-09 20:52:18 +00:00
parent 38b1c6f405
commit c55851c88b
2 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_examine.c,v 1.25 2003/05/17 09:58:03 scw Exp $ */
/* $NetBSD: db_examine.c,v 1.26 2003/11/09 20:52:18 scw Exp $ */
/*
* Mach Operating System
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_examine.c,v 1.25 2003/05/17 09:58:03 scw Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_examine.c,v 1.26 2003/11/09 20:52:18 scw Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -112,7 +112,7 @@ db_examine(db_addr_t addr, char *fmt, int count)
width = 12 * (sizeof value / 4);
break;
case 'a': /* address */
db_printf("= 0x%lx\n", addr);
db_printf("= 0x%lx\n", (long)addr);
break;
case 'r': /* signed, current radix */
value = db_get_value(addr, size, TRUE);

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_watch.c,v 1.19 2002/02/15 07:33:54 simonb Exp $ */
/* $NetBSD: db_watch.c,v 1.20 2003/11/09 20:52:18 scw Exp $ */
/*
* Mach Operating System
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_watch.c,v 1.19 2002/02/15 07:33:54 simonb Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_watch.c,v 1.20 2003/11/09 20:52:18 scw Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@ -163,8 +163,8 @@ db_list_watchpoints(void)
for (watch = db_watchpoint_list; watch != 0; watch = watch->link)
db_printf("%s%p %8lx %lx\n",
db_map_current(watch->map) ? "*" : " ",
watch->map, watch->loaddr,
watch->hiaddr - watch->loaddr);
watch->map, (long)watch->loaddr,
(long)(watch->hiaddr - watch->loaddr));
}
/* Delete watchpoint */