diff options
author | Vinson Lee <vlee@freedesktop.org> | 2023-12-31 16:09:19 -0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-03-21 06:32:58 +0000 |
commit | 7cd28b970937200a63b2d53d36853e78b233988f (patch) | |
tree | e2a82ee9263f7ce77967e511a63bd65063436eca | |
parent | 19e58247e4b7b24f1c5ea3694eafaac998ceea76 (diff) |
arb_multisample: Fix bitwise-instead-of-logical warning
tests/spec/arb_multisample/pushpop.c:144:9: warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
144 | return test_enable_bits(enable_on) & test_coverage(coverage_mode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| &&
tests/spec/arb_multisample/pushpop.c:144:9: note: cast one or both operands to int to silence this warning
Fixes: 1f58a74ca ("ARB_multisample/pushpop: New test for PushAttrib/PopAttrib.")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/857>
-rw-r--r-- | tests/spec/arb_multisample/pushpop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/spec/arb_multisample/pushpop.c b/tests/spec/arb_multisample/pushpop.c index e6d8cf34d..1e6365341 100644 --- a/tests/spec/arb_multisample/pushpop.c +++ b/tests/spec/arb_multisample/pushpop.c @@ -141,7 +141,7 @@ test_coverage(bool mode) static bool test_state(bool enable_on, bool coverage_mode) { - return test_enable_bits(enable_on) & test_coverage(coverage_mode); + return test_enable_bits(enable_on) && test_coverage(coverage_mode); } static void |