[Spice-devel] [PATCH spice] Avoid a 'missing braces around initializer' warning.
Frediano Ziglio
fziglio at redhat.com
Mon Jan 16 15:26:20 UTC 2017
>
> On Mon, 2017-01-16 at 13:15 -0200, Eduardo Lima (Etrunko) wrote:
> > On 12/01/17 18:25, Jeremy White wrote:
> > > Signed-off-by: Jeremy White <jwhite at codeweavers.com>
> > > ---
> > > server/tests/replay.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/server/tests/replay.c b/server/tests/replay.c
> > > index 8ec65d6..1f3ebb1 100644
> > > --- a/server/tests/replay.c
> > > +++ b/server/tests/replay.c
> > > @@ -44,7 +44,7 @@ static SpiceServer *server;
> > > static SpiceReplay *replay;
> > > static QXLWorker *qxl_worker = NULL;
> > > static gboolean started = FALSE;
> > > -static QXLInstance display_sin = { 0, };
> > > +static QXLInstance display_sin = { { 0 }, 0, NULL };
> > > static gint slow = 0;
> > > static gint skip = 0;
> > > static gboolean print_count = FALSE;
> > >
> >
> > Can you try to initalize with { 0 }; (no comma) and see what
> > happens? In
> > the end this must be something with older compiler versions, and
> > nothing
> > really critical.
> >
> Isn't a static variable by default initialized to "0" ?
>
> Pavel
>
Yes, filled with zeroes, so
static QXLInstance display_sin;
mainly globals if not initialized (even not static).
Frediano
More information about the Spice-devel
mailing list