On 15 Feb 2014, at 18:02, Bruce Evans <b...@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
signature.asc
Description: Message signed with OpenPGP using GPGMail