Mesa (staging/18.2): r600/sb: Fix constant-logical-operand warning.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Oct 15 08:56:09 UTC 2018
Module: Mesa
Branch: staging/18.2
Commit: 38b69a2fd8dd970b73fca8df7acf46854d880ef6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=38b69a2fd8dd970b73fca8df7acf46854d880ef6
Author: Vinson Lee <vlee at freedesktop.org>
Date: Wed Oct 10 13:38:12 2018 -0700
r600/sb: Fix constant-logical-operand warning.
sb/sb_bc_parser.cpp:620:27: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
if (cf->bc.op_ptr->flags && FF_GDS)
^ ~~~~~~
sb/sb_bc_parser.cpp:620:27: note: use '&' for a bitwise operation
if (cf->bc.op_ptr->flags && FF_GDS)
^~
&
sb/sb_bc_parser.cpp:620:27: note: remove constant to silence this warning
if (cf->bc.op_ptr->flags && FF_GDS)
~^~~~~~~~~
Fixes: da977ad90747 ("r600/sb: start adding GDS support")
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
Reviewed-by: Dave Airlie <airlied at redhat.com>
(cherry picked from commit cc33621e3b83e9bb0d89f8c6fd4e79700fe89c27)
---
src/gallium/drivers/r600/sb/sb_bc_parser.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
index a7b828268b..4b909f85f1 100644
--- a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
+++ b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
@@ -617,7 +617,7 @@ int bc_parser::decode_fetch_clause(cf_node* cf) {
int r;
unsigned i = cf->bc.addr << 1, cnt = cf->bc.count + 1;
- if (cf->bc.op_ptr->flags && FF_GDS)
+ if (cf->bc.op_ptr->flags & FF_GDS)
cf->subtype = NST_GDS_CLAUSE;
else
cf->subtype = NST_TEX_CLAUSE;
More information about the mesa-commit
mailing list