]> Pileus Git - ~andy/fetchmail/commitdiff
gcc -Wall cleanup.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 15 Dec 1998 16:17:21 +0000 (16:17 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 15 Dec 1998 16:17:21 +0000 (16:17 -0000)
svn path=/trunk/; revision=2278

NEWS
driver.c
env.c
fetchmail-features.html
sink.c
smtp.c
smtp.h
socket.c

diff --git a/NEWS b/NEWS
index 1166f649af9c329713c048b28ec4d0c700fc3a1f..bbc998b510353765cca12e34435d0d59065c28e8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,9 @@
 
 fetchmail-4.7.1 ():
 * Enable fetchmail to build correctly on systems without socketpair.
+* gcc -Wall cleanup.
+
+There are 246 people on fetchmail-friends and 327 on fetchmail-announce.
 
 fetchmail-4.7.0 (Mon Dec 14 12:05:27 EST 1998):
 * Minor correction to make i18n subdirectory builds work better.
index f9cd17638edc2216a44e4cb57c82567d39a1c1be..c3004ebeba82dd20957eb11320423f1b445b2c27 100644 (file)
--- a/driver.c
+++ b/driver.c
@@ -1282,7 +1282,7 @@ static void send_size_warnings(struct query *ctl)
     int size, nbr;
     int msg_to_send = FALSE;
     struct idlist *head=NULL, *current=NULL;
-    int max_warning_poll_count, good, bad;
+    int max_warning_poll_count;
 #define OVERHD "Subject: Fetchmail oversized-messages warning.\r\n\r\nThe following oversized messages remain on the mail server:"
 
     head = ctl->skipped;
diff --git a/env.c b/env.c
index cfd39f4999e9b11b97c9fab025f85bf3ab022238..fc2dd22fdd3bfe8b35dec5d4dd0f9403f989d612 100644 (file)
--- a/env.c
+++ b/env.c
 #ifdef HAVE_GETHOSTBYNAME
 #include <netdb.h>
 #endif /* HAVE_GETHOSTBYNAME */
-#ifndef HAVE_STRFTIME /* For ctime prototype */
 #include  <sys/types.h>
 #include  <time.h>
-#endif
 #include "fetchmail.h"
 
 #include "i18n.h"
index 974bb03a082299640821498bb944399e72628138..7cdf489f20b2ccbf00bf16c69e69c9393a7c2c47 100644 (file)
@@ -10,7 +10,7 @@
 <table width="100%" cellpadding=0><tr>
 <td width="30%">Back to <a href="index.html">Fetchmail Home Page</a>
 <td width="30%" align=center>To <a href="/~esr/sitemap.html">Site Map</a>
-<td width="30%" align=right>$Date: 1998/11/29 03:57:29 $
+<td width="30%" align=right>$Date: 1998/12/15 16:17:21 $
 </table>
 <HR>
 
 <UL>
 <LI> Fetchmail now sends bouncemail on SMTP and LMTP errors.
 
+<LI> Full support for LMTP according to RFC2033.
+
 <LI> True multi-language support using GNU gettext.
 
 <LI> Support for use of HESIOD with Kerberos.
 
-<LI> The -bsmtp option supports recording fetched mail as a BSMTP batch.
+<LI> The --bsmtp option supports recording fetched mail as a BSMTP batch.
 
 <LI> The --limit option can now be used in daemon mode, with oversized-message
 notifications being mailed to the calling user.
@@ -37,7 +39,7 @@ in <a href="http://www.demon.net/">www.demon.net</a>'s POP3 service.
 
 <LI> Code is 64-bit clean and Y2K-safe.
 
-<LI> Automatically decodes armored 7-bit MIME into 8 bits.
+<LI> Can axutomatically decodes armored 7-bit MIME into 8 bits.
 
 <LI> You can specify which SMTP error is recognized as a spam block.
 
@@ -163,7 +165,7 @@ get-mail, gwpop, pimp-1.0, pop-perl5-1.2, popc, popmail-1.6 and upop.<P>
 <table width="100%" cellpadding=0><tr>
 <td width="30%">Back to <a href="index.html">Fetchmail Home Page</a>
 <td width="30%" align=center>To <a href="/~esr/sitemap.html">Site Map</a>
-<td width="30%" align=right>$Date: 1998/11/29 03:57:29 $
+<td width="30%" align=right>$Date: 1998/12/15 16:17:21 $
 </table>
 
 <P><ADDRESS>Eric S. Raymond <A HREF="mailto:esr@thyrsus.com">&lt;esr@snark.thyrsus.com&gt;</A></ADDRESS>
diff --git a/sink.c b/sink.c
index 60e157cb8d80120aada05c6cda7d89b436a9ad06..05b67016b76dfdae747d405e234a1f93ac44b908 100644 (file)
--- a/sink.c
+++ b/sink.c
@@ -15,6 +15,7 @@
 #include  <errno.h>
 #include  <string.h>
 #include  <signal.h>
+#include  <time.h>
 #ifdef HAVE_MEMORY_H
 #include  <memory.h>
 #endif /* HAVE_MEMORY_H */
@@ -445,7 +446,7 @@ int open_sink(struct query *ctl, struct msgblk *msg,
        else if (ctl->mimemsg & MSG_IS_7BIT)
            fputs(" BODY=7BIT", sinkfp);
 
-       fprintf(sinkfp, " SIZE=%ld\r\n", msg->reallen);
+       fprintf(sinkfp, " SIZE=%d\r\n", msg->reallen);
 
        /*
         * RFC 1123 requires that the domain name part of the
@@ -650,7 +651,7 @@ int open_sink(struct query *ctl, struct msgblk *msg,
         }
 
        if ((ctl->server.esmtp_options & ESMTP_SIZE) && msg->reallen > 0)
-           sprintf(options + strlen(options), " SIZE=%ld", msg->reallen);
+           sprintf(options + strlen(options), " SIZE=%d", msg->reallen);
 
        /*
         * Try to get the SMTP listener to take the Return-Path
diff --git a/smtp.c b/smtp.c
index 9e26ae77f707c7d5ec40785cf4c6f4844df68b6d..2b98d15f9213f25bc05e7a62c0b212ad982b9242 100644 (file)
--- a/smtp.c
+++ b/smtp.c
@@ -34,7 +34,7 @@ char smtp_response[MSGBUFSIZE];
 
 static char smtp_mode = 'S';
 
-int SMTP_setmode(char sl)
+void SMTP_setmode(char sl)
 /* set whether we are speaking SMTP or LMTP */
 {
     smtp_mode = sl;
diff --git a/smtp.h b/smtp.h
index 8563343ca0d7572f536b12225b7941a1dde4e1c4..bc0d9e4003d67ab32b2c7013f61aedc6916c1702 100644 (file)
--- a/smtp.h
+++ b/smtp.h
@@ -19,7 +19,7 @@
 #define ESMTP_SIZE     0x02
 #define ESMTP_ETRN     0x04
 
-int SMTP_setmode(char);
+void SMTP_setmode(char);
 int SMTP_helo(int socket,const char *host);
 int SMTP_ehlo(int socket,const char *host,int *opt);
 int SMTP_from(int socket,const char *from,const char *opts);
index 7e11a70162af0537cc049f5a19a03dca2648fde9..9af6b7cfcfb8bafa1022468e363cbacd753b734f 100644 (file)
--- a/socket.c
+++ b/socket.c
@@ -49,27 +49,24 @@ static int handle_plugin(const char *host,
                         const char *service, const char *plugin)
 /* get a socket mediated through a given external command */
 {
-    if (plugin) 
+    int fds[2];
+    if (socketpair(AF_UNIX,SOCK_STREAM,0,fds))
     {
-       int fds[2];
-       if (socketpair(AF_UNIX,SOCK_STREAM,0,fds))
-       {
-           error(0, 0, _("fetchmail: socketpair failed: %s(%d)"),strerror(errno),errno);
-           return -1;
-       }
-       if (!fork())
-       {
-           dup2(fds[0],0);
-           dup2(fds[0],1);
-           if (outlevel >= O_VERBOSE)
-               error(0, 0, _("running %s %s %s"), plugin, host, service);
-           execlp(plugin,plugin,host,service,0);
-           error(0, 0, _("execl(%s) failed: %s (%d)"),
-                 plugin, strerror(errno), errno);
-           exit(0);
-       }
-       return fds[1];
+       error(0, 0, _("fetchmail: socketpair failed: %s(%d)"),strerror(errno),errno);
+       return -1;
+    }
+    if (!fork())
+    {
+       dup2(fds[0],0);
+       dup2(fds[0],1);
+       if (outlevel >= O_VERBOSE)
+           error(0, 0, _("running %s %s %s"), plugin, host, service);
+       execlp(plugin,plugin,host,service,0);
+       error(0, 0, _("execl(%s) failed: %s (%d)"),
+             plugin, strerror(errno), errno);
+       exit(0);
     }
+    return fds[1];
 }
 #endif /* HAVE_SOCKETPAIR */