On Fri, Oct 24, 2014 at 2:43 PM, Brooks Davis <[email protected]> wrote:
> Older code often includes idioms like: > > static const char rcsid[] = "$Id: herror.c,v 1.4 2005/04/27 04:56:41 sra > Exp $"; > > which are currently warned about with -Wunused-variable unless > -Wno-unused-const-variable is given. Unfortunatly the latter masks > variables that should be removed in some cases. The following patch causes > the three rcsid like variables I tripped on in FreeBSD's libc to always be > ingored. I'm not sure if this fits the current warnings model, but I found > it useful. > I think that making warnings like this conditional on the variable name isn't a good idea. Why not 'vcsid' or any number of other possible spellings? You can always add an attribute to such a variable declaration to silence the warning rather than flipping a flag...
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
