Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Oct 2002 22:42:51 +0200 (CEST)
From:      Stefan Farfeleder <e0026813@stud3.tuwien.ac.at>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/44121: [PATCH] bogus cast removal in hea driver
Message-ID:  <20021015204251.28F802C6@frog.fafoe>

next in thread | raw e-mail | index | archive | help

>Number:         44121
>Category:       kern
>Synopsis:       [PATCH] bogus cast removal in hea driver
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 15 13:50:01 PDT 2002
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021015204251.28F802C6>