Subject: port-amiga/1642: wrong parameter in ite.c call of rem_sicallback
To: None <gnats-bugs@gnats.netbsd.org>
From: Ignatios Souvatzis <is@beverly.rhein.de>
List: netbsd-bugs
Date: 10/18/1995 10:11:19
>Number:         1642
>Category:       port-amiga
>Synopsis:       wrong parameter in ite.c call of rem_sicallback
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 18 07:20:24 1995
>Last-Modified:
>Originator:     Ignatios Souvatzis
>Organization:
	Suppers 'r' us
>Release:        wipux 951016
>Environment:
	
System: NetBSD beverly 1.0A NetBSD 1.0A (BEVERLY) #239: Fri Oct 13 13:28:01 MET 1995 is@beverly:/usr/src/sys/arch/amiga/compile/BEVERLY amiga


>Description:
	in ite.c, the new *_sicallback function prototypes expose sloppy parameter
	usage. At one point, the wrong callback function is removed. (Thats why I
	marked this 'critical').

	There are other sloppynesses in ite.c, only detected with make ite.o DEBUG=-Wall, 
	with hopefully no ill effect; I'll send-pr them seperately.
>How-To-Repeat:
	try to make kernel: compiler complains
>Fix:

Index: ite.c
===================================================================
RCS file: /monster/cvs/src/sys/arch/amiga/dev/ite.c,v
retrieving revision 1.1.1.2
diff -u -b -r1.1.1.2 ite.c
--- ite.c	1995/10/17 12:43:15	1.1.1.2
+++ ite.c	1995/10/18 08:57:46
@@ -830,7 +830,7 @@
 static void
 ite_sifilter(void *arg1, void *arg2)
 {
-	ite_filter((u_char)arg1, (enum caller)arg2);
+	ite_filter((u_char)(u_long)arg1, (enum caller)arg2);
 }
 
 
@@ -841,7 +841,7 @@
 {
 	tout_pending = 0;
 	if (last_char) 
-		add_sicallback(ite_sifilter, (void *)last_char,
+		add_sicallback(ite_sifilter, (void *)(u_long)last_char,
 		    (void *)ITEFILT_REPEATER);
 }
 
@@ -869,7 +869,7 @@
 	 * to not allow a key-up event to get thru before a repeat for
 	 * the key-down, we remove any outstanding callout requests..
 	 */
-	rem_sicallback(ite_filter);
+	rem_sicallback(ite_sifilter);
 
 	up = c & 0x80 ? 1 : 0;
 	c &= 0x7f;
>Audit-Trail:
>Unformatted: