Re: [PATCH] tracing: Fix clang -Wint-in-bool-context warnings in IF_ASSIGN macro

From: Steven Rostedt
Date: Thu Sep 26 2019 - 08:15:14 EST


On Thu, 26 Sep 2019 01:37:29 +0200
DÃvid Bolvanskà <david.bolvansky@xxxxxxxxx> wrote:

> GCC C frontend does not warn, GCC C++ FE does. https://godbolt.org/z/_sczyM
>
> So I (we?) think there is something weird in gcc frontends.
>
> >> I can't think of a case that this warning is a bug (maybe David can
> explain more),
>
> In this case or generally? General bug example:
>
> if (state == A || B)
>
> (should be if (state == A || state == B))
>
> Since this is just one occurrence and I recommend to just land this small
> fix.
>

Can we add the above comment to the commit log. I was stuck on
wondering what was wrong with the original code, and was ignoring the
patch because I couldn't see what was wrong.

-- Steve