[vlc-devel] [PATCH 1/2] d3d11: d3d11_surface: fix zero-initialization

Alexandre Janniaux ajanni at videolabs.io
Fri Jul 24 20:37:47 CEST 2020


Hi,

As far as I tested, it doesn't warn.

Maybe it has an exception for = { 0 } since it's pretty
common.

Regards,
--
Alexandre Janniaux
Videolabs

On Fri, Jul 24, 2020 at 01:06:34PM +0300, Rémi Denis-Courmont wrote:
> Le perjantaina 24. heinäkuuta 2020, 12.24.25 EEST Alexandre Janniaux a écrit :
> > zero-initialization with = {} is a GNU extension and is only standardly
> > available in C++.
>
> AFAIR, this patch will cause a missing initializer warning.
>
> > ---
> >  modules/hw/d3d11/d3d11_surface.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/modules/hw/d3d11/d3d11_surface.c
> > b/modules/hw/d3d11/d3d11_surface.c index 4622436c4ed..cabb1ab9ef7 100644
> > --- a/modules/hw/d3d11/d3d11_surface.c
> > +++ b/modules/hw/d3d11/d3d11_surface.c
> > @@ -614,7 +614,7 @@ static picture_t *AllocateCPUtoGPUTexture(filter_t
> > *p_filter, filter_sys_t *p_sy video_format_Copy(&fmt_staging,
> > &p_filter->fmt_out.video);
> >      fmt_staging.i_chroma = cfg->fourcc;
> >
> > -    picture_resource_t dummy_res = {};
> > +    picture_resource_t dummy_res = {0};
> >      picture_t *p_dst = picture_NewFromResource(&fmt_staging, &dummy_res);
> >      if (p_dst == NULL) {
> >          msg_Err(p_filter, "Failed to map create the temporary picture.");
>
>
> --
> 雷米‧德尼-库尔蒙
> http://www.remlab.net/
>
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list