Subject: port-i386/7554: netboot fails to compile in sys/arch/i386/stand/netboot due to lack of casts
To: None <gnats-bugs@gnats.netbsd.org>
From: David Rankin <drankin@bohemians.lexington.ky.us>
List: netbsd-bugs
Date: 05/11/1999 11:51:57
>Number:         7554
>Category:       port-i386
>Synopsis:       netboot fails to compile in sys/arch/i386/stand/netboot due to lack of casts
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-i386-maintainer (NetBSD/i386 Portmaster)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 11 11:50:02 1999
>Last-Modified:
>Originator:     David Rankin
>Organization:
Bohemians Unincorporated
>Release:        NetBSD 1.4
>Environment:
	
System: NetBSD portia 1.3I NetBSD 1.3I (PORTIA) #13: Tue Mar 30 00:03:19 EST 1999 drankin@oldtom:/usr/src/sys/arch/i386/compile/PORTIA i386


>Description:
	
When running "make" from command line in /usr/src/sys/arch/i386/stand/netboot,
the compile fails on /usr/src/sys/arch/i386/stand/lib/netif/dp8390.c with
casting failures cought on -Wall. 
>How-To-Repeat:
	
cd /usr/src/sys/arch/i386/stand/netboot
Uncomment these lines in makefile:
	USE_NETIF= wd80x3 #and uncomment at least one of the two following lines
	CPPFLAGS+= -DSUPPORT_WD80X3
	CPPFLAGS+= -DSUPPORT_SMC_ULTRA
make
>Fix:
	

Apply this patch.

--- /usr/src/sys/arch/i386/stand/lib/netif/dp8390.c.bak	Tue May 11 13:26:47 1999
+++ /usr/src/sys/arch/i386/stand/lib/netif/dp8390.c	Tue May 11 13:28:55 1999
@@ -193,7 +193,7 @@
 int len;
 {
 #ifdef _STANDALONE
-	vpbcopy(pkt, dp8390_membase, len);
+	vpbcopy(pkt, (void *) dp8390_membase, len);
 #else
 	bbcopy(pkt, vmembase, len);
 #endif
@@ -225,7 +225,7 @@
 
 		/* Copy amount up to end of NIC memory. */
 #ifdef _STANDALONE
-		pvbcopy(buf, dest, tmp_amount);
+		pvbcopy((void *) buf, dest, tmp_amount);
 #else
 		bbcopy(vmembase + buf - dp8390_membase, dest, tmp_amount);
 #endif
@@ -235,7 +235,7 @@
 		dest += tmp_amount;
 	}
 #ifdef _STANDALONE
-	pvbcopy(buf, dest, len);
+	pvbcopy( (void *) buf, dest, len);
 #else
 	bbcopy(vmembase + buf - dp8390_membase, dest, len);
 #endif
@@ -284,7 +284,7 @@
 	 * the NIC.
 	 */
 #ifdef _STANDALONE
-	pvbcopy(packet_ptr, &packet_hdr, 4);
+	pvbcopy( (void *) packet_ptr, &packet_hdr, 4);
 #else
 	bbcopy(vmembase + packet_ptr - dp8390_membase, &packet_hdr, 4);
 #endif
>Audit-Trail:
>Unformatted:
Priority: medium