From owner-cvs-all Mon Dec 14 14:10:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA18963 for cvs-all-outgoing; Mon, 14 Dec 1998 14:04:48 -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 OAA18955 for ; Mon, 14 Dec 1998 14:04:45 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.1/8.9.1) id OAA49586; Mon, 14 Dec 1998 14:04:28 -0800 (PST) (envelope-from dillon) Date: Mon, 14 Dec 1998 14:04:28 -0800 (PST) From: Matthew Dillon Message-Id: <199812142204.OAA49586@apollo.backplane.com> To: Brian Somers Cc: committers@FreeBSD.ORG Subject: Re: best way to fix function mismatch warning References: <199812140824.IAA00838@keep.lan.Awfulhak.org> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk : :> This warning occurs because the vxintr function does not match the :> function type expected by pci_map_int. That is, because pci_map_int :> expects a void func(void *) function and vxintr is a :> void func(struct softc *). :> :> So, to get rid of the warning do we (a) cast the function pointer :> in the pci_map_int() call to the correct type or (b) make the function :> (in dev/vx/*) take a void * and then reassign the variable to a pointer :> of the right type inside it? Or (c) some other choice that I haven't :> thought of ? : :(a) as there's no overhead.... alternatively, you could try (c) ;-) There's no overhead for b either, GCC detects the alias and optimizes it out. -Matt :-- :Brian : :Don't _EVER_ lose your sense of humour ! : : : 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