From 2ce001e1b0b7cc5366ea2804f66726e57910282b Mon Sep 17 00:00:00 2001 From: David Levine Date: Sat, 14 Jan 2012 09:21:32 -0600 Subject: [PATCH] gcc -Wmissing-field-initializers noticed several struct initializations that didn't explicitly list all fields. Most were of no consequence because they were for static data, so they were all initialized properly. However, the two in mhlsbr.c were missing an initialization of other than their last field, and they contained some subsequent values other than zero. So, those later fields were initialized incorrectly. 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. --- sbr/addrsbr.c | 2 +- uip/mhlsbr.c | 4 ++-- uip/post.c | 8 ++++---- uip/replsbr.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sbr/addrsbr.c b/sbr/addrsbr.c index 649e06f..a99d9aa 100644 --- a/sbr/addrsbr.c +++ b/sbr/addrsbr.c @@ -361,7 +361,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/mhlsbr.c b/uip/mhlsbr.c index a0d1306..68a265d 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -134,11 +134,11 @@ static struct mcomp *fmthd = NULL; static struct mcomp *fmttl = NULL; static struct mcomp global = { - NULL, NULL, "", NULL, NULL, 0, -1, 80, -1, 40, BELL, 0 + NULL, NULL, NULL, NULL, NULL, NULL, 0, -1, 80, -1, 40, BELL, NULL }; static struct mcomp holder = { - NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, NOCOMPONENT, 0 + NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, NOCOMPONENT, NULL }; struct pair { diff --git a/uip/post.c b/uip/post.c index 2048228..8845560 100644 --- a/uip/post.c +++ b/uip/post.c @@ -266,10 +266,10 @@ static char *fccfold[FCCS]; /* foldernames for FCC'ing */ static struct headers *hdrtab; /* table for the message we're doing */ -static struct mailname localaddrs={NULL}; /* local addrs */ -static struct mailname netaddrs={NULL}; /* network addrs */ -static struct mailname uuaddrs={NULL}; /* uucp addrs */ -static struct mailname tmpaddrs={NULL}; /* temporary queue */ +static struct mailname localaddrs; /* local addrs */ +static struct mailname netaddrs; /* network addrs */ +static struct mailname uuaddrs; /* uucp addrs */ +static struct mailname tmpaddrs; /* temporary queue */ #ifdef SMTPMTS static int snoop = 0; diff --git a/uip/replsbr.c b/uip/replsbr.c index 7f0f523..ace850d 100644 --- a/uip/replsbr.c +++ b/uip/replsbr.c @@ -24,7 +24,7 @@ static int dftype=0; static char *badaddrs = NULL; static char *dfhost = NULL; -static struct mailname mq = { NULL }; +static struct mailname mq; static int nodupcheck = 0; /* If set, no check for duplicates */ /* -- 1.7.10.4