Subject: kern/33965: gcc4 build failure in aic7xxx_osm.c
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <dholland@eecs.harvard.edu>
List: netbsd-bugs
Date: 07/10/2006 15:45:00
>Number:         33965
>Category:       kern
>Synopsis:       gcc4 build failure in aic7xxx_osm.c
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 10 15:45:00 +0000 2006
>Originator:     David A. Holland <dholland@eecs.harvard.edu>
>Release:        NetBSD 3.99.21 (-20060710)
>Organization:
   Harvard EECS
>Environment:
	
	
System: NetBSD weatherwax 3.99.21 NetBSD 3.99.21 (WEATHERWAX) #0: Fri Jul  7 13:37:33 EDT 2006  dholland@weatherwax:/usr/src/sys/arch/i386/compile/WEATHERWAX i386
Architecture: i386
Machine: i386
>Description:
	gcc4 issues some signedness warnings when compiling aic7xxx_osm.c.
	As the kernel builds with -Werror, this fails it, and as gcc4 is
	now the default, it fails by default.

>How-To-Repeat:
	Build a kernel with the aic7xxx driver using gcc4.

>Fix:

I haven't booted the kernel with this patch yet (it's still compiling)
but I have checked the source for any possible unwanted consequences of
the signedness change, and there aren't any.

Index: sys/dev/ic/aic7xxx_osm.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/aic7xxx_osm.c,v
retrieving revision 1.22
diff -u -r1.22 aic7xxx_osm.c
--- sys/dev/ic/aic7xxx_osm.c	10 Apr 2006 22:35:28 -0000	1.22
+++ sys/dev/ic/aic7xxx_osm.c	10 Jul 2006 15:39:09 -0000
@@ -468,7 +468,7 @@
 	struct	ahc_tmode_tstate *tstate;
 
 	u_int	mask;
-	long	s;
+	u_long	s;
 
 	scb = (struct scb *)arg;
 	xs = scb->xs;
@@ -746,7 +746,7 @@
 {
 	struct	scb *scb;
 	struct	ahc_softc *ahc;
-	long	s;
+	u_long	s;
 	int	found;
 	u_int	last_phase;
 	int	target;

>Unformatted: