From owner-cvs-all Mon Dec 14 21:38:05 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA14201 for cvs-all-outgoing; Mon, 14 Dec 1998 21:38:05 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA14192; Mon, 14 Dec 1998 21:38:03 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.1/8.9.1) id VAA51708; Mon, 14 Dec 1998 21:37:59 -0800 (PST) (envelope-from dillon) Date: Mon, 14 Dec 1998 21:37:59 -0800 (PST) From: Matthew Dillon Message-Id: <199812150537.VAA51708@apollo.backplane.com> To: Bill Paul Cc: brian@Awfulhak.org, committers@FreeBSD.ORG Subject: Re: best way to fix function mismatch warning References: <199812142303.PAA26888@hub.freebsd.org> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk : :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. (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