Use 'z' printf format modifier to print size_t in debug code.

This commit is contained in:
jakllsch 2010-07-27 14:25:23 +00:00
parent 33a98ca057
commit 359dcd7f55
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_ksyms.c,v 1.60 2010/05/04 14:14:54 tsutsui Exp $ */
/* $NetBSD: kern_ksyms.c,v 1.61 2010/07/27 14:25:23 jakllsch Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.60 2010/05/04 14:14:54 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.61 2010/07/27 14:25:23 jakllsch Exp $");
#if defined(_KERNEL) && defined(_KERNEL_OPT)
#include "opt_ddb.h"
@ -305,7 +305,7 @@ addsymtab(const char *name, void *symstart, size_t symsize,
tab->sd_nmapsize = nsyms;
#endif
#ifdef KSYMS_DEBUG
printf("newstart %p sym %p ksyms_symsz %d str %p strsz %d send %p\n",
printf("newstart %p sym %p ksyms_symsz %zu str %p strsz %zu send %p\n",
newstart, symstart, symsize, strstart, strsize,
tab->sd_strstart + tab->sd_strsize);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: sysv_shm.c,v 1.117 2009/10/05 23:47:04 rmind Exp $ */
/* $NetBSD: sysv_shm.c,v 1.118 2010/07/27 14:25:23 jakllsch Exp $ */
/*-
* Copyright (c) 1999, 2007 The NetBSD Foundation, Inc.
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sysv_shm.c,v 1.117 2009/10/05 23:47:04 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: sysv_shm.c,v 1.118 2010/07/27 14:25:23 jakllsch Exp $");
#define SYSVSHM
@ -662,7 +662,7 @@ sys_shmget(struct lwp *l, const struct sys_shmget_args *uap, register_t *retval)
if (SCARG(uap, shmflg) & _SHM_RMLINGER)
mode |= SHMSEG_RMLINGER;
SHMPRINTF(("shmget: key 0x%lx size 0x%x shmflg 0x%x mode 0x%x\n",
SHMPRINTF(("shmget: key 0x%lx size 0x%zx shmflg 0x%x mode 0x%x\n",
SCARG(uap, key), SCARG(uap, size), SCARG(uap, shmflg), mode));
mutex_enter(&shm_lock);