Richard W.M. Jones wrote:
On Mon, Aug 10, 2009 at 10:15:45AM +0100, Matthew Booth wrote:
> In general, I would like to get down to no compiler warnings. The
> biggest culprit in daemon, though, is rpcgen generated stuff.
In libvirt we have some Perl scripts that attempt to rewrite the
output of rpcgen-generated code to remove warnings.
It's quite a bit of hassle though, and of course depends closely on
the version of rpcgen (which is enforced in libvirt I think).
Personally I'd prefer it if we could compile the rpcgen code with
-Wno-unused -fno-strict-alias. However automake doesn't support
providing CFLAGS for just a single file.
One option is to add this to the generated file:
#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
# pragma GCC diagnostic ignored "-Wunused"
#endif
I don't know if that will work with strict aliases.