Re: [Spice-devel] [PATCH spice-server 2/2] stat-file: Avoid compiler warning

2017-02-03 Thread Frediano Ziglio
> > On Thu, 2017-02-02 at 12:46 +, Frediano Ziglio wrote: > > Some gcc version reports this error: > > > > stat-file.c: In function 'stat_file_add_node': > > stat-file.c:180:15: error: 'node' may be used uninitialized in this > > function > > [-Werror=maybe-uninitialized] > >  g_strlcpy(n

Re: [Spice-devel] [PATCH spice-server 2/2] stat-file: Avoid compiler warning

2017-02-02 Thread Jonathon Jongsma
On Thu, 2017-02-02 at 12:46 +, Frediano Ziglio wrote: > Some gcc version reports this error: > > stat-file.c: In function 'stat_file_add_node': > stat-file.c:180:15: error: 'node' may be used uninitialized in this > function > [-Werror=maybe-uninitialized] >  g_strlcpy(node->name, name, si

[Spice-devel] [PATCH spice-server 2/2] stat-file: Avoid compiler warning

2017-02-02 Thread Frediano Ziglio
Some gcc version reports this error: stat-file.c: In function 'stat_file_add_node': stat-file.c:180:15: error: 'node' may be used uninitialized in this function [-Werror=maybe-uninitialized] g_strlcpy(node->name, name, sizeof(node->name)); ^~~~ cc1: all warnings being treated a