gperf/src/options.cc -- quiesce clang warnings -Wlogical-op-parentheses

David Chisnall theraven at FreeBSD.org
Fri Oct 25 10:38:50 UTC 2013


On 24 Oct 2013, at 21:50, Sean Bruno <sean_bruno at yahoo.com> wrote:

> On Thu, 2013-10-24 at 21:24 -0400, David Chisnall wrote:
>> 
>> Don't forget the freelocale() at the end.
>> 
> ah, ok.  I wish that there was some kind of example that I could go off
> of in the man page.  I'm sort of trundling my way through various bits
> of the system to find the obvious example of how to do this correctly.
> 
>> This seems like a very slow way of doing what was very fast in the
>> original code though.  I'm not entirely sure what you're aiming to
>> gain in this refactoring.
>> 
>> David
>> 
>> 
> 
> I'm simply trying to address the warnings that appear due to clang.  I
> find the builds very noisy and if there's a better way to address this
> issue, I'm totally open to suggestions.

Well, for contrib code that isn't going to be around for much longer like gperf, the best thing to do is probably just stick -Wno-logical-op-parentheses in the CFLAGS.  Alternatively, adding the brackets as it suggested to indicate precedence is simple.

David



More information about the freebsd-current mailing list