Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Sep 2004 07:10:57 GMT
From:      Dmitri Nikulin <setagllib@optusnet.com.au>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/71449: sys/compat/ndis Compilation warnings
Message-ID:  <200409070710.i877AvOh096280@www.freebsd.org>
Resent-Message-ID: <200409070720.i877KKed067125@freefall.freebsd.org>

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

>Number:         71449
>Category:       kern
>Synopsis:       sys/compat/ndis Compilation warnings
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 07 07:20:19 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Dmitri Nikulin
>Release:        5.3-BETA3
>Organization:
>Environment:
FreeBSD dirk.vic.optushome.com.au 5.3-BETA3 FreeBSD 5.3-BETA3 #8: Mon Sep  6 23:44:48 EST 2004     root@dirk.vic.optushome.com.au:/usr/obj/home/bsd/src/sys/KERN  i386
>Description:
Oversights in casting when __stdcall isn't meaningless cause warnings, which, when compiled into the kernel via options NDISAPI and no removal of -werror, kill a kernel compile.
>How-To-Repeat:
'options NDISAPI' in kernel config
Compile kernel normally
>Fix:
Relative to src/sys/compat:

diff -ruN ndis/subr_ndis.c ndis.new/subr_ndis.c
--- ndis/subr_ndis.c	Tue Aug 17 05:25:27 2004
+++ ndis.new/subr_ndis.c	Tue Sep  7 17:04:58 2004
@@ -2875,7 +2875,7 @@
 	__stdcall ndis_proc	workfunc;
 
 	work = ctx;
-	workfunc = work->nwi_func;
+	workfunc = (__stdcall ndis_proc) work->nwi_func;
 	workfunc(work, work->nwi_ctx);
 	return;
 }
diff -ruN ndis/subr_ntoskrnl.c ndis.new/subr_ntoskrnl.c
--- ndis/subr_ntoskrnl.c	Tue Aug 17 04:52:37 2004
+++ ndis.new/subr_ntoskrnl.c	Tue Sep  7 17:05:27 2004
@@ -1694,7 +1694,7 @@
 	uint8_t			irql;
 
 	dpc = arg;
-	dpcfunc = (kdpc_func)dpc->k_deferedfunc;
+	dpcfunc = (__stdcall kdpc_func) dpc->k_deferedfunc;
 	irql = ntoskrnl_raise_irql(DISPATCH_LEVEL);
 	dpcfunc(dpc, dpc->k_deferredctx, dpc->k_sysarg1, dpc->k_sysarg2);
 	ntoskrnl_lower_irql(irql);
>Release-Note:
>Audit-Trail:
>Unformatted:



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