Subject: kern/35808: sys/dev/usb/ugen.c doesn't compile with UGEN_DEBUG
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <ef@math.uni-bonn.de>
List: netbsd-bugs
Date: 02/23/2007 13:40:00
>Number: 35808
>Category: kern
>Synopsis: sys/dev/usb/ugen.c doesn't compile with UGEN_DEBUG
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Feb 23 13:40:00 +0000 2007
>Originator: Edgar Fuß
>Release: NetBSD 4.0 beta2
>Organization:
Mathematisches Institut der Universität Bonn, Computerabteilung
>Description:
Compilation of sys/dev/usb/ugen.c fails with printf format warning
if both options UGEN_DEBUG and options UGEN_BULK_RA_WB are in effect.
>How-To-Repeat:
options UGEN_DEBUG
options UGEN_BULK_RA_WB
>Fix:
change %d format to %zd in sys/dev/usb/ugen.c:
--- ugen.c.orig 2007-02-23 14:28:31.000000000 +0100
+++ ugen.c 2007-02-23 14:26:53.000000000 +0100
@@ -627,7 +627,7 @@
case UE_BULK:
#ifdef UGEN_BULK_RA_WB
if (sce->state & UGEN_BULK_RA) {
- DPRINTFN(5, ("ugenread: BULK_RA req: %d used: %d\n",
+ DPRINTFN(5, ("ugenread: BULK_RA req: %zd used: %d\n",
uio->uio_resid, sce->ra_wb_used));
xfer = sce->ra_wb_xfer;
@@ -825,7 +825,7 @@
case UE_BULK:
#ifdef UGEN_BULK_RA_WB
if (sce->state & UGEN_BULK_WB) {
- DPRINTFN(5, ("ugenwrite: BULK_WB req: %d used: %d\n",
+ DPRINTFN(5, ("ugenwrite: BULK_WB req: %zd used: %d\n",
uio->uio_resid, sce->ra_wb_used));
xfer = sce->ra_wb_xfer;