Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Feb 2005 08:10:13 -0800
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        hackers@freebsd.org
Subject:   finding casts from a type
Message-ID:  <20050207161012.GA23177@odin.ac.hmc.edu>

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

--2oS5YaxWCcQjTEyO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

I'm trying to figure out an efficent way to find all the places where a
given type (in my case struct ifnet *) is cast to another.  Does anyone
know of a tool to do this?  I need to include implicit casts to (void
*). I could do it by hand, but this is would be tedious and error prone
given that there are over 330 files that refrence struct ifnet in the
kernel.  The ideal solution would be a pragma or something to cause
gcc to generate a warning since once I move struct ifnet out of driver
softc's all casts will be bugs.  Initially I need to catch (void *)
casts, but that probably won't be necessicary long term.

-- Brooks

--=20
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

--2oS5YaxWCcQjTEyO
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFCB5LhXY6L6fI4GtQRAol9AKC1Xw6pvXMZR/Yxd6jeJnPZjhoLdQCffhpc
lUfwt6PgYO0ST0Dt6d5R5kA=
=BlgB
-----END PGP SIGNATURE-----

--2oS5YaxWCcQjTEyO--



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