From dc41c0ebfae020368ccf832f0fe0528ceb137f2c Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Sat, 22 Oct 2016 15:35:26 +0200 Subject: irmd, tools: Fix missing initializers The BSD compiler requires explicit initializers for all fields with the -Wmissing-field-initializers flag enabled On branch be-fix-build # Changes to be committed: # modified: src/irmd/main.c # modified: src/tools/irm/irm.c # modified: src/tools/irm/irm_bind.c # modified: src/tools/irm/irm_ipcp.c # modified: src/tools/irm/irm_unbind.c # # Untracked files: # killouroboros.sh # start.sh # --- src/irmd/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/irmd') diff --git a/src/irmd/main.c b/src/irmd/main.c index 4dee4b91..390681a8 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -1993,7 +1993,7 @@ void * mainloop(void * o) static int irm_create(void) { - struct stat st = {0}; + struct stat st; struct timeval timeout = {(IRMD_ACCEPT_TIMEOUT / 1000), (IRMD_ACCEPT_TIMEOUT % 1000) * 1000}; @@ -2001,6 +2001,8 @@ static int irm_create(void) if (irmd == NULL) return -ENOMEM; + memset(&st, 0, sizeof(st)); + irmd->state = IRMD_NULL; if (pthread_rwlock_init(&irmd->state_lock, NULL)) { -- cgit v1.2.3