VTAILQ_EMPTY vs -Wparentheses-equality with clang
Federico Schwindt
fgsch at lodoss.net
Mon Apr 4 16:43:17 CEST 2016
Weird. I'm using clang 3.7 and I'm not seeing any warnings.
What OS is this?
On Mon, Apr 4, 2016 at 2:46 PM, Dridi Boukelmoune <dridi at varni.sh> wrote:
> Hi,
>
> As I said on IRC I have hit a bug while working on a VMOD and then on
> Varnish itself. I thought I had seen other false-positives but that's
> the only one, in several places.
>
> Basically it complains when you use it in an if or while statement or
> I suppose anything that expects a condition, because it interprets the
> outer set of parentheses as a hint not to warn about assignment. So
> we've gone full circle on this one!
>
> Do we use this kind of condition in Varnish?
>
> if ((var = expr))
>
> If not I suggest we disable it in autogen.des, my workaround is to use gcc.
>
> I haven't tried clang above 3.7.0, but basically it is _not_ looking
> at preprocessed code, in which we obviously don't have the outer
> parentheses:
>
> if (VTAILQ_EMPTY(...))
>
> make -k log attached.
>
> Current Travis CI continuous integration uses clang 3.4 FYI.
>
> Best Regards,
> Dridi
>
> _______________________________________________
> varnish-dev mailing list
> varnish-dev at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20160404/39b9323c/attachment.html>
More information about the varnish-dev
mailing list