aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-10-20 06:25:23 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-10-20 06:25:23 +0000
commita8fb4194926aa22732192b37768be34aec0c9360 (patch)
tree4cf96546c03fa82ebdbf13dac92d10d35e4b4211
parent62bdd79aa94a2c4624cb662c9ac43f9bf95d5427 (diff)
downloadfetchmail-a8fb4194926aa22732192b37768be34aec0c9360.tar.gz
fetchmail-a8fb4194926aa22732192b37768be34aec0c9360.tar.bz2
fetchmail-a8fb4194926aa22732192b37768be34aec0c9360.zip
-Wall cleanup.
svn path=/trunk/; revision=2120
-rw-r--r--checkalias.c3
-rw-r--r--conf.c6
-rw-r--r--driver.c9
-rw-r--r--env.c1
-rw-r--r--fetchmail.c3
-rw-r--r--getpass.c2
-rw-r--r--sink.c12
-rw-r--r--unmime.c2
8 files changed, 17 insertions, 21 deletions
diff --git a/checkalias.c b/checkalias.c
index 5e4386b6..1f8936de 100644
--- a/checkalias.c
+++ b/checkalias.c
@@ -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 4a544564..81d6d29d 100644
--- 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');
diff --git a/driver.c b/driver.c
index d2d0cf2f..a09ed4fa 100644
--- 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 ffd352ed..87118245 100644
--- 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)
diff --git a/fetchmail.c b/fetchmail.c
index b738cf9d..4be298f7 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -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");
diff --git a/getpass.c b/getpass.c
index 5fe4968a..7e08368e 100644
--- 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 90af32ed..318ef551 100644
--- 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
diff --git a/unmime.c b/unmime.c
index 2acc3f74..2f9bddb0 100644
--- 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 */