radeonsi: Add parentheses around '|' operands.
authorVinson Lee <vlee@freedesktop.org>
Tue, 10 Sep 2013 03:14:28 +0000 (20:14 -0700)
committerVinson Lee <vlee@freedesktop.org>
Tue, 10 Sep 2013 17:44:09 +0000 (10:44 -0700)
Fixes GCC parentheses warning.

r600_texture.c: In function 'si_texture_create':
r600_texture.c:518:20: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
      !(templ->bind & PIPE_BIND_CURSOR | PIPE_BIND_LINEAR)) {
                    ^

Fixes "Wrong operator used" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/r600_texture.c

index ef4e8653aee4e26ff1717a61b1bdc3708e6a7f28..e6e8e200e5cff42a1186351efab7161a5e0d1d3b 100644 (file)
@@ -515,7 +515,7 @@ struct pipe_resource *si_texture_create(struct pipe_screen *screen,
        int r;
 
        if (!(templ->flags & R600_RESOURCE_FLAG_TRANSFER) &&
-           !(templ->bind & PIPE_BIND_CURSOR | PIPE_BIND_LINEAR)) {
+           !(templ->bind & (PIPE_BIND_CURSOR | PIPE_BIND_LINEAR))) {
                if (templ->flags & R600_RESOURCE_FLAG_FORCE_TILING ||
                    templ->nr_samples > 1) {
                        array_mode = V_009910_ARRAY_2D_TILED_THIN1;