On Wed, Jun 4, 2014 at 4:48 PM, Vinson Lee <v...@freedesktop.org> wrote: > This patch fixes these clang constant-logical-operand warnings. > > ../../../../../src/mesa/tnl_dd/t_dd_tritmp.h:130:32: warning: use of logical > '||' with constant operand [-Wconstant-logical-operand] > if (DO_TWOSIDE || DO_OFFSET || DO_UNFILLED || DO_TWOSTENCIL) > ^ ~~~~~~~~~~~
Sorry about the warnings, but I think the code is fine as is. These are supposed to be constant operands. Look at how the macros are defined and used: #define DO_TWOSIDE (IND & R200_TWOSIDE_BIT) ... #define IND (0) #define TAG(x) x #include "tnl_dd/t_dd_tritmp.h" #define IND (R200_TWOSIDE_BIT) #define TAG(x) x##_twoside #include "tnl_dd/t_dd_tritmp.h" If anything, you should modify the definition to something like #define DO_TWOSIDE ((IND & R200_TWOSIDE_BIT) != 0) and hope clang doesn't complain, since they'll still be able to be evaluated at compile time. Changing to bitwise operations isn't right. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev