Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Dec 1998 21:37:59 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Bill Paul <wpaul@FreeBSD.ORG>
Cc:        brian@Awfulhak.org, committers@FreeBSD.ORG
Subject:   Re: best way to fix function mismatch warning
Message-ID:  <199812150537.VAA51708@apollo.backplane.com>
References:   <199812142303.PAA26888@hub.freebsd.org>

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

:
:The mechanism used in most of the drivers I've looked at (and the one
:that I use myself) is b. Usually, you see something like:
:
:void foo_intr(xsc)
:	void			*xsc;
:{
:	struct foo_softc	*sc = xsc;
:
:	/* blah */
:
:	return;
:}
:
:-Bill

    It may seem messy, but I think this is probably the best way.   It is
    certainly better then casting the procedure pointer in the assignment
    (which could lead to type changes being silently ignored).  I am going
    to start doing this whenever I see the warning.

						-Matt

    Matthew Dillon  Engineering, HiWay Technologies, Inc. & BEST Internet 
                    Communications & God knows what else.
    <dillon@backplane.com> (Please include original email in any response)    

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



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