diff options
author | Jeremy White <jwhite@codeweavers.com> | 2019-09-17 10:33:59 -0500 |
---|---|---|
committer | Jeremy White <jwhite@codeweavers.com> | 2020-03-11 13:06:42 -0500 |
commit | ae644b3475cdd1d81df5ff4fac5d5776936049c5 (patch) | |
tree | 2802782fa2b5679f3b534f28380d1bae480512ce | |
parent | f816cd9761a1e0799ad5d655bbedc82026485bd6 (diff) |
Fix compliation on gcc 4.X.
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
-rw-r--r-- | src/gui.c | 2 | ||||
-rw-r--r-- | src/listen.c | 2 | ||||
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/spice.c | 2 |
4 files changed, 4 insertions, 4 deletions
@@ -147,7 +147,7 @@ void session_disconnect_client(session_t *session) int main(int argc, char *argv[]) { gui_t gui; - session_t session = { 0 }; + session_t session = { }; setlocale(LC_ALL, ""); gui_create(&gui, &session, argc, argv); diff --git a/src/listen.c b/src/listen.c index 452fd81..76c0798 100644 --- a/src/listen.c +++ b/src/listen.c @@ -117,7 +117,7 @@ int listen_parse(const char *listen_spec, char **addr, int *port_start, int *por static int try_port(const char *addr, int port) { static const int on = 1, off = 0; - struct addrinfo ai = { 0 }, *res, *e; + struct addrinfo ai = { }, *res, *e; char portbuf[33]; int sock, rc; @@ -55,7 +55,7 @@ int main(int argc, char *argv[]) { int rc; - session_t session = { 0 }; + session_t session = { }; int display_opened = 0; int spice_started = 0; diff --git a/src/spice.c b/src/spice.c index e9beec0..9e64ad7 100644 --- a/src/spice.c +++ b/src/spice.c @@ -451,7 +451,7 @@ static int send_monitors_config(spice_t *s, int w, int h) int spice_create_primary(spice_t *s, int w, int h, int bytes_per_line, void *shmaddr) { - QXLDevSurfaceCreate surface = { 0 }; + QXLDevSurfaceCreate surface = { }; surface.height = h; surface.width = w; |