Re: [Spice-devel] [PATCH spice] Avoid a 'missing braces around initializer' warning.

2017-01-16 Thread Frediano Ziglio
> 
> 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 
> > > ---
> > >  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
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH spice] Avoid a 'missing braces around initializer' warning.

2017-01-16 Thread Pavel Grunt
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 
> > ---
> >  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

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH spice] Avoid a 'missing braces around initializer' warning.

2017-01-16 Thread Eduardo Lima (Etrunko)
On 12/01/17 18:25, Jeremy White wrote:
> Signed-off-by: Jeremy White 
> ---
>  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.

-- 
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etru...@redhat.com
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH spice] Avoid a 'missing braces around initializer' warning.

2017-01-13 Thread Jeremy White
On 01/13/2017 04:48 AM, Frediano Ziglio wrote:
>>
>> Signed-off-by: Jeremy White 
>> ---
>>  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;
> 
> Works.
> 
> Why you have this warning turned on?
> Which environment were you using?

This is in Debian stable; I haven't customized anything in particular
afacit:
  gcc (Debian 4.9.2-10) 4.9.2

Cheers,

Jeremy
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH spice] Avoid a 'missing braces around initializer' warning.

2017-01-13 Thread Frediano Ziglio
> 
> Signed-off-by: Jeremy White 
> ---
>  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;

Works.

Why you have this warning turned on?
Which environment were you using?

Frediano
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH spice] Avoid a 'missing braces around initializer' warning.

2017-01-12 Thread Jeremy White
Signed-off-by: Jeremy White 
---
 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;
-- 
2.1.4

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel