From 9c624b9ce0f6a566193507bbcf4dd360f7a08445 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 10 Oct 1997 13:21:18 +0000 Subject: -Wall cleanup. svn path=/trunk/; revision=1497 --- driver.c | 12 +++++------- etrn.c | 4 +--- imap.c | 1 - pop3.c | 4 ++-- rfc822.c | 2 +- 5 files changed, 9 insertions(+), 14 deletions(-) diff --git a/driver.c b/driver.c index b16848a4..e04e716e 100644 --- a/driver.c +++ b/driver.c @@ -495,7 +495,7 @@ static int stuffline(struct query *ctl, char *buf) else /* writing to SMTP, leave the byte-stuffing in place */; } - else /* if (!protocol->delimited) /* not byte-stuffed already */ + else /* if (!protocol->delimited) -- not byte-stuffed already */ { if (!ctl->mda) SockWrite(ctl->smtp_socket, buf, 1); /* byte-stuff it */ @@ -827,8 +827,6 @@ int num; /* index of message */ map_name(received_for, ctl, &xmit_names); else { - int i; - /* * We haven't extracted the envelope address. * So check all the header addresses. @@ -1286,7 +1284,7 @@ int len; /* length of message */ flag forward; /* TRUE to forward */ { int linelen; - char buf[MSGBUFSIZE+1], *cp; + char buf[MSGBUFSIZE+1]; /* pass through the text lines */ while (protocol->delimited || len > 0) @@ -1393,8 +1391,8 @@ int do_protocol(ctl, proto) struct query *ctl; /* parsed options with merged-in defaults */ const struct method *proto; /* protocol method table */ { - int ok, js, pst, sock = -1; - char *msg, *cp; + int ok, js, sock = -1; + char *msg; void (*sigsave)(); #ifndef KERBEROS_V4 @@ -1454,7 +1452,7 @@ const struct method *proto; /* protocol method table */ } else { - char buf [POPBUFSIZE+1], *sp, *realhost; + char buf [POPBUFSIZE+1], *realhost; int *msgsizes, len, num, count, new, deletions = 0; int port, fetches; struct idlist *idp; diff --git a/etrn.c b/etrn.c index 66f1317d..d8234dca 100644 --- a/etrn.c +++ b/etrn.c @@ -33,10 +33,8 @@ static int etrn_getrange(int sock, struct query *ctl, char *id, int *countp, /* send ETRN and interpret the response */ { int ok, opts; - char buf [POPBUFSIZE+1], - hname[256]; + char buf [POPBUFSIZE+1]; struct idlist *qnp; /* pointer to Q names */ - struct hostent *hp; if ((ok = SMTP_ehlo(sock, ctl->server.truename, &opts))) { diff --git a/imap.c b/imap.c index 315f5407..e6958f67 100644 --- a/imap.c +++ b/imap.c @@ -462,7 +462,6 @@ static int imap_getsizes(int sock, int count, int *sizes) /* capture the sizes of all messages */ { char buf [POPBUFSIZE+1]; - int i; gen_send(sock, "FETCH 1:%d RFC822.SIZE", count); for (;;) diff --git a/pop3.c b/pop3.c index 24c63147..9fda2861 100644 --- a/pop3.c +++ b/pop3.c @@ -263,7 +263,7 @@ pop3_slowuidl( int sock, struct query *ctl, int *countp, int *newp) * + Otherwise run a binary search to determine the last known message */ int ok, nolinear = 0; - int first_nr, list_len, try_id, try_nr, hop_id, add_id; + int first_nr, list_len, try_id, try_nr, add_id; int num; char id [IDLEN+1]; @@ -464,7 +464,7 @@ static int pop3_fetch(int sock, struct query *ctl, int number, int *lenp) /* request nth message */ { int ok; - char buf [POPBUFSIZE+1], *cp; + char buf [POPBUFSIZE+1]; gen_send(sock, "RETR %d", number); if ((ok = pop3_ok(sock, buf)) != 0) diff --git a/rfc822.c b/rfc822.c index a41e14a3..3bbad5c4 100644 --- a/rfc822.c +++ b/rfc822.c @@ -43,7 +43,7 @@ const char *host; /* server hostname */ for (cp = buf; *cp; cp++) if (*cp == ',' || isspace(*cp)) addresscount++; - buf = (char *)realloc(buf, strlen(buf) + addresscount * strlen(host) + 1); + buf = (char *)xrealloc(buf, strlen(buf) + addresscount * strlen(host) + 1); #endif /* TESTMAIN */ parendepth = state = 0; -- cgit v1.2.3