From 34218c6ae70cb7a7236cbd5fd597bb97d00a9bc9 Mon Sep 17 00:00:00 2001 From: mbalmer Date: Sun, 23 Jan 2011 11:01:08 +0000 Subject: [PATCH] Cast arguments to vaddr_t when using PRIxVADDR in the printf format string. --- sys/kern/tty.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 799f3818dfdf..c663288818b9 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1,4 +1,4 @@ -/* $NetBSD: tty.c,v 1.240 2011/01/23 07:30:07 matt Exp $ */ +/* $NetBSD: tty.c,v 1.241 2011/01/23 11:01:08 mbalmer Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.240 2011/01/23 07:30:07 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.241 2011/01/23 11:01:08 mbalmer Exp $"); #include #include @@ -2433,10 +2433,11 @@ ttygetinfo(struct tty *tp, int fromsig, char *buf, size_t bufsz) #ifdef LWP_PC if (l->l_stat == LSONPROC) { snprintf(lmsg, sizeof(lmsg), "%#"PRIxVADDR"/%d", - LWP_PC(l), cpu_index(l->l_cpu)); + (vaddr_t)LWP_PC(l), cpu_index(l->l_cpu)); strlcat(buf, lmsg, bufsz); } else if (l->l_stat == LSRUN) { - snprintf(lmsg, sizeof(lmsg), "%#"PRIxVADDR, LWP_PC(l)); + snprintf(lmsg, sizeof(lmsg), "%#"PRIxVADDR, + (vaddr_t)LWP_PC(l)); strlcat(buf, lmsg, bufsz); } else { strlcat(buf, l->l_wchan ? l->l_wmesg : "iowait", bufsz);