]> Pileus Git - ~andy/fetchmail/commitdiff
-Wall cleanup.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 20 Oct 1998 06:25:23 +0000 (06:25 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 20 Oct 1998 06:25:23 +0000 (06:25 -0000)
svn path=/trunk/; revision=2120

checkalias.c
conf.c
driver.c
env.c
fetchmail.c
getpass.c
sink.c
unmime.c

index 5e4386b6c5aaf9777bc564336dd39d4391754406..1f8936de473eca31b5171a7193ed794a23e53445 100644 (file)
@@ -33,7 +33,8 @@ static int is_ip_alias(const char *name1,const char *name2)
        address_t address;
     } 
     address_e;
-    address_e *host_a_addr, *host_b_addr,*dummy_addr;
+    address_e *host_a_addr=0, *host_b_addr=0;  /* assignments pacify -Wall */
+    address_e *dummy_addr;
 
     int i;
     struct hostent *hp;
diff --git a/conf.c b/conf.c
index 4a544564a59940b87a051714319d959b7fe2eabd..81d6d29d6665eeaf50113ee3d70f02d262f9492e 100644 (file)
--- a/conf.c
+++ b/conf.c
@@ -60,8 +60,6 @@ static void indent(char ic)
 static void stringdump(const char *name, const char *member)
 /* dump a string member with current indent */
 {
-    static char        buf[BUFSIZ];
-
     indent('\0');
     fprintf(stdout, "\"%s\":", name);
     if (member)
@@ -71,14 +69,14 @@ static void stringdump(const char *name, const char *member)
     fputs(",\n", stdout);
 }
 
-static int numdump(const char *name, const int num)
+static void numdump(const char *name, const int num)
 /* dump a numeric quantity at current indent */
 {
     indent('\0');
     fprintf(stdout, "'%s':%d,\n", name, num);
 }
 
-static int booldump(const char *name, const int onoff)
+static void booldump(const char *name, const int onoff)
 /* dump a boolean quantity at current indent */
 {
     indent('\0');
index d2d0cf2f6c825a246c9a6b0b3be125cd0515874f..a09ed4fa04eda5607a5307fd06f2938fa636480b 100644 (file)
--- a/driver.c
+++ b/driver.c
@@ -64,6 +64,7 @@
 #include <com_err.h>
 #endif /* KERBEROS_V5 */
 
+#include "socket.h"
 #include  "fetchmail.h"
 
 #if INET6
@@ -121,7 +122,6 @@ struct query *ctl;          /* list of permissible aliases */
 struct idlist **xmit_names;    /* list of recipient names parsed out */
 {
     const char *lname;
-    int sl;
     int off = 0;
     
     lname = idpair_find(&ctl->localnames, name+off);
@@ -1239,7 +1239,6 @@ static void send_warning(struct query *ctl)
 {
     int size, nbr;
     int msg_to_send = FALSE;
-    FILE *tmpfile = NULL;
     struct idlist *head=NULL, *current=NULL;
     int max_warning_poll_count, good, bad;
 #define OVERHD "Subject: Fetchmail WARNING.\r\n\r\nThe following oversized messages remain on the mail server:\n\r\n"
@@ -1309,7 +1308,7 @@ const struct method *proto;       /* protocol method table */
     int ok, js, sock = -1;
     char *msg;
     void (*sigsave)();
-    struct idlist *current=NULL, *prev=NULL, *next=NULL, *head=NULL, *tmp=NULL;
+    struct idlist *current=NULL, *tmp=NULL;
 
     protocol = (struct method *)proto;
     ctl->server.base_protocol = protocol;
@@ -1395,7 +1394,7 @@ const struct method *proto;       /* protocol method table */
     else
     {
        char buf [POPBUFSIZE+1], *realhost;
-       int *msgsizes, len, num, count, new, bytes, deletions = 0;
+       int len, num, count, new, bytes, deletions = 0, *msgsizes = NULL;
 #if INET6
        int fetches, dispatches;
 #else /* INET6 */
@@ -1676,7 +1675,7 @@ const struct method *proto;       /* protocol method table */
                                if (toolarge && !check_only) 
                                {
                                    char size[32];
-                                   int cnt, bytesz = msgsizes[num-1];
+                                   int cnt;
 
                                    /* convert sz to string */
                                    sprintf(size, "%d", msgsizes[num-1]);
diff --git a/env.c b/env.c
index ffd352edbef17f8634adb647f30cd67ae30bd201..8711824506d75203fa178c78ea8b5d94d800af87 100644 (file)
--- a/env.c
+++ b/env.c
@@ -28,7 +28,6 @@ extern char *program_name;
 void envquery(int argc, char **argv)
 /* set up basic stuff from the environment (including the rc file name) */
 {
-    char tmpbuf[BUFSIZ]; 
     struct passwd *pw;
 
     if ((program_name = strrchr(argv[0], '/')) != NULL)
index b738cf9d3e4ec10214c131115865a9f6b1b2c74b..4be298f722bd249fdf0e5085badeacf521db568c 100644 (file)
@@ -1364,8 +1364,7 @@ void dump_params (struct runctl *runp, struct query *querylist, flag implicit)
                {
                    struct idlist *idp;
 
-                   printf("  Recognized listener spam block responses are:",
-                          ctl->antispam);
+                   printf("  Recognized listener spam block responses are:");
                    for (idp = ctl->antispam; idp; idp = idp->next)
                        printf(" %d", idp->val.status.num);
                    printf("\n");
index 5fe4968abdedab8614a79e6f6a8b2030e3e2a80a..7e08368ecb8d46929a785a8aa046ce9b2992acca 100644 (file)
--- a/getpass.c
+++ b/getpass.c
@@ -75,7 +75,7 @@ char *prompt;
     register c;
     FILE *fi;
     static char pbuf[INPUT_BUF_SIZE];
-    RETSIGTYPE (*sig)();
+    RETSIGTYPE (*sig)() = 0;   /* initialization pacifies -Wall */
     RETSIGTYPE sigint_handler();
 
     int istty = isatty(0);
diff --git a/sink.c b/sink.c
index 90af32edb439fe32663f9bef3eca9d75a2330761..318ef551769d32ff85394f060453174c216c44c0 100644 (file)
--- a/sink.c
+++ b/sink.c
@@ -276,9 +276,9 @@ int open_sink(struct query *ctl,
             */
            nameslen = 0;
            for (idp = xmit_names; idp; idp = idp->next)
-               if (idp->val.status.mark == XMIT_ACCEPT)
+               if ((idp->val.status.mark == XMIT_ACCEPT))
                    nameslen += (strlen(idp->id) + 1);  /* string + ' ' */
-           if (*good_addresses = 0)
+           if ((*good_addresses = 0))
                nameslen = strlen(run.postmaster);
 
            names = (char *)xmalloc(nameslen + 1);      /* account for '\0' */
@@ -318,17 +318,17 @@ int open_sink(struct query *ctl,
 
            /* find length of resulting mda string */
            sp = before;
-           while (sp = strstr(sp, "%s")) {
+           while ((sp = strstr(sp, "%s"))) {
                length += nameslen - 2; /* subtract %s */
                sp += 2;
            }
            sp = before;
-           while (sp = strstr(sp, "%T")) {
+           while ((sp = strstr(sp, "%T"))) {
                length += nameslen - 2; /* subtract %T */
                sp += 2;
            }
            sp = before;
-           while (sp = strstr(sp, "%F")) {
+           while ((sp = strstr(sp, "%F"))) {
                length += fromlen - 2;  /* subtract %F */
                sp += 2;
            }
@@ -336,7 +336,7 @@ int open_sink(struct query *ctl,
            after = xmalloc(length + 1);
 
            /* copy mda source string to after, while expanding %[sTF] */
-           for (dp = after, sp = before; *dp = *sp; dp++, sp++) {
+           for (dp = after, sp = before; (*dp = *sp); dp++, sp++) {
                if (sp[0] != '%')       continue;
 
                /* need to expand? BTW, no here overflow, because in
index 2acc3f74e2473a0bcf7db70975c32054f297c93d..2f9bddb0052f9874d448ef2eb69b3569f55de286 100644 (file)
--- a/unmime.c
+++ b/unmime.c
@@ -74,7 +74,7 @@ void UnMimeHeader(unsigned char *hdr)
 
   int  state = S_COPY_PLAIN;
   unsigned char *p_in, *p_out, *p;
-  unsigned char enc;
+  unsigned char enc = '\0';            /* initialization pacifies -Wall */
   int  i;
 
   /* Speed up in case this is not a MIME-encoded header */