gperf/src/options.cc -- quiesce clang warnings -Wlogical-op-parentheses
Dimitry Andric
dim at FreeBSD.org
Mon Oct 21 06:46:14 UTC 2013
On Oct 21, 2013, at 05:50, Sean Bruno <sean_bruno at yahoo.com> wrote:
> gperf has some clang warnings that seem to be harmless, but annoying
> regarding some of the logical operations around detecting ascii chars:
>
> c++ -O2 -pipe -I/usr/obj/usr/src/tmp/legacy/usr/include -Wno-c
> ++11-extensions -I/usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib
> -I/usr/src/gnu/usr.bin/g
> perf -c /usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/options.cc
> /usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/options.cc:284:27:
> warning: '&&' within '||' [-Wlogical-op-parentheses]
> if (*arg >= 'A' && *arg <= 'Z' || *arg >= 'a' && *arg <= 'z')
> ~~~~~~~~~~~~^~~~~~~~~~~~~~ ~~
For contributed code, let's just turn the warnings off instead. There
is almost no end to the amount of work you could spend on fixing
warnings in GNU code... :-)
-Dimitry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20131021/db27dc76/attachment.sig>
More information about the freebsd-current
mailing list