[Mesa-dev] [PATCH] st/mesa: Fix missing-braces warning.

Samuel Pitoiset samuel.pitoiset at gmail.com
Wed Apr 12 07:43:36 UTC 2017


Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

On 04/12/2017 09:22 AM, Vinson Lee wrote:
>    CXX      state_tracker/st_glsl_to_nir.lo
> state_tracker/st_glsl_to_nir.cpp:250:57: warning: suggest braces around initialization of subobject [-Wmissing-braces]
>        nir_lower_wpos_ytransform_options wpos_options = {0};
>                                                          ^
>                                                          {}
> 
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>   src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
> index 674ccd07a4..e863bab4e7 100644
> --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
> +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
> @@ -247,7 +247,7 @@ st_glsl_to_nir(struct st_context *st, struct gl_program *prog,
>         static const gl_state_index wposTransformState[STATE_LENGTH] = {
>            STATE_INTERNAL, STATE_FB_WPOS_Y_TRANSFORM
>         };
> -      nir_lower_wpos_ytransform_options wpos_options = {0};
> +      nir_lower_wpos_ytransform_options wpos_options = { { 0 } };
>         struct pipe_screen *pscreen = st->pipe->screen;
>   
>         memcpy(wpos_options.state_tokens, wposTransformState,
> 


More information about the mesa-dev mailing list