[Mesa-dev] [PATCH] st/mesa: silence missing braces warning in st_program.c

Marek Olšák maraeo at gmail.com
Mon Aug 1 16:05:59 UTC 2016


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Mon, Aug 1, 2016 at 5:57 PM, Brian Paul <brianp at vmware.com> wrote:
> Silence a gcc warning:
> state_tracker/st_program.c: In function 'st_create_fp_variant':
> state_tracker/st_program.c:957:10: warning: missing braces around initializer [-Wmissing-braces]
>           nir_lower_drawpixels_options options = {0};
>           ^
> state_tracker/st_program.c:957:10: warning: (near initialization for 'options.texcoord_state_tokens') [-Wmissing-braces]
> ---
>  src/mesa/state_tracker/st_program.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
> index ebeed14..e297bb1 100644
> --- a/src/mesa/state_tracker/st_program.c
> +++ b/src/mesa/state_tracker/st_program.c
> @@ -954,7 +954,7 @@ st_create_fp_variant(struct st_context *st,
>
>        /* glDrawPixels (color only) */
>        if (key->drawpixels) {
> -         nir_lower_drawpixels_options options = {0};
> +         nir_lower_drawpixels_options options = {{0}};
>           unsigned samplers_used = stfp->Base.Base.SamplersUsed;
>
>           /* Find the first unused slot. */
> --
> 1.9.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list