<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 24, 2014 at 2:43 PM, Brooks Davis <span dir="ltr"><<a href="mailto:brooks@freebsd.org" target="_blank">brooks@freebsd.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":1tn" class="a3s" style="overflow:hidden">Older code often includes idioms like:<br>
<br>
static const char rcsid[] = "$Id: herror.c,v 1.4 2005/04/27 04:56:41 sra Exp $";<br>
<br>
which are currently warned about with -Wunused-variable unless<br>
-Wno-unused-const-variable is given.  Unfortunatly the latter masks<br>
variables that should be removed in some cases.  The following patch causes<br>
the three rcsid like variables I tripped on in FreeBSD's libc to always be<br>
ingored.  I'm not sure if this fits the current warnings model, but I found<br>
it useful.<br></div></blockquote><div><br></div><div>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?</div><div><br></div><div>You can always add an attribute to such a variable declaration to silence the warning rather than flipping a flag...</div></div></div></div>