From 517661967774d60716ecff152c642b417195f900 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Tue, 27 Mar 2012 09:46:59 +0200 Subject: [PATCH] Proper field initialization. gcc -Wmissing-field-initializers noticed several struct initializations that didn't explicitly list all fields. They were of no consequence because they were for static data, so they were initialized properly. Also, changed the initialization of global.c_ovtxt from "" to NULL because free_queue () freed it if non-NULL, though I think the "" was always overwritten. Pulled in from nmh. Thanks to David Levine. --- sbr/addrsbr.c | 2 +- uip/mhl.c | 4 ++-- uip/repl.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sbr/addrsbr.c b/sbr/addrsbr.c index 4876d09..e759088 100644 --- a/sbr/addrsbr.c +++ b/sbr/addrsbr.c @@ -241,7 +241,7 @@ ismymbox(struct mailname *np) char buffer[BUFSIZ]; struct mailname *mp; static char *am = NULL; - static struct mailname mq={NULL}; + static struct mailname mq; /* ** If this is the first call, initialize diff --git a/uip/mhl.c b/uip/mhl.c index 69797ad..321c5f9 100644 --- a/uip/mhl.c +++ b/uip/mhl.c @@ -105,11 +105,11 @@ static struct mcomp *fmthd = NULL; static struct mcomp *fmttl = NULL; static struct mcomp global = { - NULL, NULL, "", NULL, NULL, 0, -1, 80, -1, 0, 0 + NULL, NULL, NULL, NULL, NULL, 0, -1, 80, -1, 0, NULL }; static struct mcomp holder = { - NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NOCOMPONENT, 0 + NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NOCOMPONENT, NULL }; struct pair { diff --git a/uip/repl.c b/uip/repl.c index 07ec48c..2c14224 100644 --- a/uip/repl.c +++ b/uip/repl.c @@ -101,7 +101,7 @@ static int dftype=0; static char *badaddrs = NULL; static char *dfhost = NULL; -static struct mailname mq = { NULL }; +static struct mailname mq; static struct format *fmt; -- 1.7.10.4