From stefan@fafoe.dyndns.org  Tue Oct 15 13:42:55 2002
Return-Path: <stefan@fafoe.dyndns.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id BA31237B401
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 15 Oct 2002 13:42:55 -0700 (PDT)
Received: from fafoe.dyndns.org (chello212186121237.14.vie.surfer.at [212.186.121.237])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 455FB43FA1
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 15 Oct 2002 13:42:53 -0700 (PDT)
	(envelope-from stefan@fafoe.dyndns.org)
Received: by frog.fafoe (Postfix, from userid 1001)
	id 28F802C6; Tue, 15 Oct 2002 22:42:51 +0200 (CEST)
Message-Id: <20021015204251.28F802C6@frog.fafoe>
Date: Tue, 15 Oct 2002 22:42:51 +0200 (CEST)
From: Stefan Farfeleder <e0026813@stud3.tuwien.ac.at>
Reply-To: Stefan Farfeleder <e0026813@stud3.tuwien.ac.at>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] bogus cast removal in hea driver
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         44121
>Category:       kern
>Synopsis:       [PATCH] bogus cast removal in hea driver
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 15 13:50:01 PDT 2002
>Closed-Date:    Tue Aug 17 16:41:01 GMT 2004
>Last-Modified:  Tue Aug 17 16:41:01 GMT 2004
>Originator:     Stefan Farfeleder
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
FreeBSD frog.fafoe 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Thu Oct 3 21:27:04 CEST 2002 freebsd@frog.fafoe:/freebsd/current/obj/freebsd/current/src/sys/FROG i386

	
>Description:
The current code casts vct (which hat type VCI_Table *) to a uintptr_t and then
passes the integer to bzero that wants a void *. 
	
>How-To-Repeat:
make buildkernel
[...]
/freebsd/current/src/sys/dev/hea/eni_vcm.c:289: warning: passing arg 1 of pointer to function makes pointer from integer without a cast

	
>Fix:
Just remove the cast.

Index: eni_vcm.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/hea/eni_vcm.c,v
retrieving revision 1.10
diff -u -r1.10 eni_vcm.c
--- eni_vcm.c	19 Apr 2002 17:43:11 -0000	1.10
+++ eni_vcm.c	15 Oct 2002 20:10:53 -0000
@@ -286,7 +286,7 @@
 	/*
 	 * Reset everything
 	 */
-	bzero ( (uintptr_t)vct, sizeof(VCI_Table) );
+	bzero ( vct, sizeof(VCI_Table) );
 
 	return ( err );
 }
>Release-Note:
>Audit-Trail:

From: Stefan Farfeleder <e0026813@stud3.tuwien.ac.at>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/44121: [PATCH] bogus cast removal in hea driver
Date: Tue, 15 Oct 2002 23:51:10 +0200

 My "fix" isn't really all that good, since gcc now complains about
 losing const. So I think the pointer should be cast to void *. The same
 applies to eni_buffer.c:127 btw. Sorry.
State-Changed-From-To: open->patched 
State-Changed-By: robert 
State-Changed-When: Wed Oct 16 04:28:30 PDT 2002 
State-Changed-Why:  
A fix was committed to -current. 
Thanks for reporting the problem. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=44121 
State-Changed-From-To: patched->closed 
State-Changed-By: stefanf 
State-Changed-When: Tue Aug 17 16:34:14 GMT 2004 
State-Changed-Why:  
Doesn't apply to -stable. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=44121 
>Unformatted:
