[Mesa-dev] [PATCH 1/3] glsl: add parens in shader_integer_mix() to silence compiler warning

Ian Romanick idr at freedesktop.org
Tue May 5 15:01:15 PDT 2015


Weird that I didn't notice this when I wrote the code. :( Sorry about
that.  This patch is

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

On 05/05/2015 02:50 PM, Brian Paul wrote:
> Silences gcc warning:
> builtin_functions.cpp:204:23: warning: suggest parentheses around '&&'
> within '||' [-Wparentheses]
> ---
>  src/glsl/builtin_functions.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp
> index 1df6956..97055d8 100644
> --- a/src/glsl/builtin_functions.cpp
> +++ b/src/glsl/builtin_functions.cpp
> @@ -201,7 +201,7 @@ static bool
>  shader_integer_mix(const _mesa_glsl_parse_state *state)
>  {
>     return state->is_version(450, 310) ||
> -          v130(state) && state->EXT_shader_integer_mix_enable;
> +          (v130(state) && state->EXT_shader_integer_mix_enable);
>  }
>  
>  static bool
> 



More information about the mesa-dev mailing list