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

From: David Chisnall <theraven_at_FreeBSD.org>
Date: Fri, 25 Oct 2013 06:38:43 -0400
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
Received on Fri Oct 25 2013 - 08:38:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:43 UTC