svn commit: r261916 - head/sys/dev/xen/console

Dimitry Andric dim at FreeBSD.org
Sat Feb 15 18:03:42 UTC 2014


On 15 Feb 2014, at 18:02, Bruce Evans <brde at optusnet.com.au> wrote:
> On Sat, 15 Feb 2014, Dimitry Andric wrote:
...
> Why?  There are hundreds if not thousands of static inline functions in
> headers, and most of these functions are not always used, so there would
> be [hundreds if not thousands] * [number of #includes] compiler warnings
> if compilers warned about things like this.  They could handle include
> files specially, but shouldn't.

Some compilers (e.g. clang 3.4) do warn about this. :-)  If code is
unused, it should be cleaned up, IMHO.  But because I got several
remarks in the past that deleting code might sometimes inconvenience
developers, I prefer to just use #if 0 instead.

For some contributed sources, or sources which have no maintainer or an
unresponsive maintainer, I usually just disable the warning instead.
But that won't clean up the dead code...

-Dimitry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20140215/68e32155/attachment.sig>


More information about the svn-src-all mailing list