소스 검색

radeonsi: Add parentheses around '|' operands.

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>
tags/mesa-10.1-devel
Vinson Lee 12 년 전
부모
커밋
49f2ba2cb0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      src/gallium/drivers/radeonsi/r600_texture.c

+ 1
- 1
src/gallium/drivers/radeonsi/r600_texture.c 파일 보기

@@ -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;

Loading…
취소
저장