Re: [Spice-devel] [PATCH x11spice] Fix compliation on gcc 4.X.

2020-03-12 Thread Uri Lublin
On 3/11/20 9:10 PM, Jeremy White wrote: Hi, I'm afraid that does not help on the gcc 4.8.5 on RHEL 7.X, particularly with structures that contain other structures. gcc -Wall -DTHREE -o /dev/null -c test.c test.c: In function ‘handle_sigterm’: test.c:12:12: warning: missing braces around

Re: [Spice-devel] [PATCH x11spice] Fix compliation on gcc 4.X.

2020-03-12 Thread Frediano Ziglio
If I can suggest, for sigaction, just use memset! It's weird structure defined in different way in different systems, and also on the same system could be different depending on some flags. It's a weird combination of unions and structures, in reality some field name you use are preprocessor

Re: [Spice-devel] [PATCH x11spice] Fix compliation on gcc 4.X.

2020-03-11 Thread Jeremy White
Hi, I'm afraid that does not help on the gcc 4.8.5 on RHEL 7.X, particularly with structures that contain other structures. gcc -Wall -DTHREE -o /dev/null -c test.c test.c: In function ‘handle_sigterm’: test.c:12:12: warning: missing braces around initializer [-Wmissing-braces] struct

Re: [Spice-devel] [PATCH x11spice] Fix compliation on gcc 4.X.

2020-03-11 Thread Uri Lublin
Hi, Thanks for the ping on IRC. On 9/17/19 7:23 PM, Jeremy White wrote: gcc 4.x warns if you use a { 0 } initialization construct for a structure with an initial member that is also a struct. The { } construct is simpler and appears to work on a wider range of gcc versions. On my Fedora 31,

[Spice-devel] [PATCH x11spice] Fix compliation on gcc 4.X.

2019-09-17 Thread Jeremy White
gcc 4.x warns if you use a { 0 } initialization construct for a structure with an initial member that is also a struct. The { } construct is simpler and appears to work on a wider range of gcc versions. This is a correction to fdfdf1107be100b983de1bff4beee8e6360f670b Signed-off-by: Jeremy White