Subject: port-amd64/36591: wpi(4) does not compile on amd64
To: None <port-amd64-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <khorben@defora.org>
List: netbsd-bugs
Date: 07/01/2007 21:55:00
>Number:         36591
>Category:       port-amd64
>Synopsis:       wpi(4) does not compile on amd64
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-amd64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 01 21:55:00 +0000 2007
>Originator:     khorben@defora.org
>Release:        NetBSD 4.0_BETA2
>Organization:
khorben
>Environment:
System: NetBSD syn.defora.rom 4.0_BETA2 NetBSD 4.0_BETA2 (GENERIC.MP) #2: Sun Jul 1 04:06:51 CEST 2007 khorben@syn.defora.rom:/usr/obj/sys/arch/amd64/compile/GENERIC.MP amd64
Architecture: x86_64
Machine: amd64

>Description:

Including the wpi(4) driver in 4.0_BETA2 by adding this to
GENERIC.local:
wpi*	at pci? dev ? function ?

triggers the following error when compiling:

cc1: warnings being treated as errors
/usr/src/sys/dev/pci/if_wpi.c: In function 'wpi_init':
/usr/src/sys/dev/pci/if_wpi.c:2669: warning: format '%u' expects type
'unsigned int', but argument 3 has type 'size_t'

With this issue fixed, the driver will probably deserve to be enabled by
default on this architecture.

>How-To-Repeat:

Compile a 4.0_BETA2 kernel with the wpi(4) driver enabled.

>Fix:

Index: if_wpi.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_wpi.c,v
retrieving revision 1.6
diff -u -r1.6 if_wpi.c
--- if_wpi.c	16 Nov 2006 01:33:09 -0000	1.6
+++ if_wpi.c	1 Jul 2007 21:53:04 -0000
@@ -2665,7 +2665,7 @@
 		le32toh(hdr.datasz) + le32toh(hdr.bootsz);
 
 	if (size < wsize) {
-		aprint_error("%s: fw file too short: should be %d bytes\n",
+		aprint_error("%s: fw file too short: should be %zu bytes\n",
 			sc->sc_dev.dv_xname, wsize);
 		error = EINVAL;
 		goto fail2;