[Mesa-dev] [PATCH] radeonsi: Add parentheses around '|' operands.
Marek Olšák
maraeo at gmail.com
Tue Sep 10 02:18:08 PDT 2013
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Tue, Sep 10, 2013 at 5:19 AM, Vinson Lee <vlee at freedesktop.org> wrote:
> 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 at freedesktop.org>
> ---
> src/gallium/drivers/radeonsi/r600_texture.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeonsi/r600_texture.c b/src/gallium/drivers/radeonsi/r600_texture.c
> index ef4e865..e6e8e20 100644
> --- a/src/gallium/drivers/radeonsi/r600_texture.c
> +++ b/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;
> --
> 1.8.3.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list