]> git.marmaro.de Git - mmh/commitdiff
gcc -Wmissing-field-initializers noticed several struct initializations
authorDavid Levine <levinedl@acm.org>
Sat, 14 Jan 2012 15:21:32 +0000 (09:21 -0600)
committerDavid Levine <levinedl@acm.org>
Sat, 14 Jan 2012 15:21:32 +0000 (09:21 -0600)
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
uip/mhlsbr.c
uip/post.c
uip/replsbr.c

index 649e06f4631f226555dde622820e4110c1a6de9d..a99d9aab42a08c352dc3822bf74ca36d06894804 100644 (file)
@@ -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
index a0d1306845606b3a047183755d540a1c1d867610..68a265d5e605ee2da1e32fc8206a04df8866424c 100644 (file)
@@ -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 {
index 20482282fa0c0e6f86074244368b0e78d8877fc3..8845560758d18623a66244e249b6e13271dfe04f 100644 (file)
@@ -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;
index 7f0f52375ef1b79a0d7721f38dcc65b0b4374207..ace850dbb747717874a06ed3ae07fe16d02e2711 100644 (file)
@@ -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 */
 
 /*