diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2004-10-20 09:14:04 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2004-10-20 09:14:04 +0000 |
commit | 334cb452bfee4d0511f9591292903d01f58efaf9 (patch) | |
tree | 21d7baddc9b7fde16dfa1c315693623649144083 | |
parent | 65f9c5e8d026830b0fbd2583007c507e5e6e2b78 (diff) | |
download | fetchmail-334cb452bfee4d0511f9591292903d01f58efaf9.tar.gz fetchmail-334cb452bfee4d0511f9591292903d01f58efaf9.tar.bz2 fetchmail-334cb452bfee4d0511f9591292903d01f58efaf9.zip |
Fix miscellaneous warnings.
svn path=/trunk/; revision=3953
-rw-r--r-- | daemon.c | 1 | ||||
-rw-r--r-- | driver.c | 5 | ||||
-rw-r--r-- | env.c | 2 | ||||
-rw-r--r-- | fetchmail.c | 11 | ||||
-rw-r--r-- | fetchmail.h | 14 | ||||
-rw-r--r-- | imap.c | 7 | ||||
-rw-r--r-- | pop3.c | 8 | ||||
-rw-r--r-- | rcfile_y.y | 8 | ||||
-rw-r--r-- | report.c | 2 | ||||
-rw-r--r-- | sink.c | 1 | ||||
-rw-r--r-- | socket.c | 8 | ||||
-rw-r--r-- | transact.c | 6 |
12 files changed, 26 insertions, 47 deletions
@@ -57,7 +57,6 @@ static RETSIGTYPE sigchld_handler (int sig) /* process SIGCHLD to obtain the exit code of the terminating process */ { - extern volatile int lastsig; /* last signal received */ pid_t pid; #if defined(HAVE_WAITPID) /* the POSIX way */ @@ -35,6 +35,8 @@ #include <hesiod.h> #endif +#include <langinfo.h> + #if defined(HAVE_RES_SEARCH) || defined(HAVE_GETHOSTBYNAME) #include <netdb.h> #include "mx.h" @@ -312,7 +314,6 @@ static void send_size_warnings(struct query *ctl) int msg_to_send = FALSE; struct idlist *head=NULL, *current=NULL; int max_warning_poll_count; - char *tmp; head = ctl->skipped; if (!head) @@ -333,7 +334,7 @@ static void send_size_warnings(struct query *ctl) if (open_warning_by_mail(ctl, (struct msgblk *)NULL)) return; stuff_warning(ctl, - tmp = rfc2047e( + rfc2047e( GT_("Subject: Fetchmail oversized-messages warning"), nl_langinfo(CODESET))); stuff_warning(ctl, ""); stuff_warning(ctl, @@ -32,8 +32,6 @@ extern char *getenv(const char *); /* needed on sysV68 R3V7.1. */ -extern char *program_name; - void envquery(int argc, char **argv) /* set up basic stuff from the environment (including the rc file name) */ { diff --git a/fetchmail.c b/fetchmail.c index de5215a9..1756c73f 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -116,7 +116,6 @@ static char *timestamp (void) static RETSIGTYPE donothing(int sig) { - extern volatile int lastsig; /* declared in idle.c */ set_signal_handler(sig, donothing); lastsig = sig; } @@ -124,7 +123,7 @@ static RETSIGTYPE donothing(int sig) int main(int argc, char **argv) { int bkgd = FALSE; - int parsestatus, implicitmode = FALSE; + int implicitmode = FALSE; struct query *ctl; netrc_entry *netrc_list; char *netrc_file, *tmpbuf; @@ -180,7 +179,7 @@ int main(int argc, char **argv) } #endif - if ((parsestatus = parsecmdline(argc,argv, &cmd_run, &cmd_opts)) < 0) + if ((parsecmdline(argc,argv, &cmd_run, &cmd_opts)) < 0) exit(PS_SYNTAX); if (versioninfo) @@ -461,10 +460,8 @@ int main(int argc, char **argv) GT_("fetchmail: can't find a password for %s@%s.\n"), ctl->remotename, ctl->server.pollname); return(PS_AUTHFAIL); - } - else - { - char* password_prompt = GT_("Enter password for %s@%s: "); + } else { + const char* password_prompt = GT_("Enter password for %s@%s: "); xalloca(tmpbuf, char *, strlen(password_prompt) + strlen(ctl->remotename) + diff --git a/fetchmail.h b/fetchmail.h index 6de7cf8a..a42dafa5 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -22,16 +22,9 @@ #include <stdio.h> -/* We need this for time_t */ -#if TIME_WITH_SYS_TIME -# include <sys/time.h> -# include <time.h> -#else -# if HAVE_SYS_TIME_H -# include <sys/time.h> -# else -# include <time.h> -# endif +/* We need this for strstr */ +#if !defined(HAVE_STRSTR) && !defined(strstr) +char *strstr(const char *, const char *); #endif /* constants designating the various supported protocols */ @@ -518,6 +511,7 @@ extern int mytimeout; /* idle.c */ int interruptible_idle(int interval); +extern volatile int lastsig; /* sink.c: forwarding */ void smtp_close(struct query *, int); @@ -19,13 +19,6 @@ #include "i18n.h" -#ifdef OPIE_ENABLE -#endif /* OPIE_ENABLE */ - -#ifndef strstr /* glibc-2.1 declares this as a macro */ -extern char *strstr(const char *, const char *); /* needed on sysV68 R3V7.1. */ -#endif /* strstr */ - /* imap_version values */ #define IMAP2 -1 /* IMAP2 or IMAP2BIS, RFC1176 */ #define IMAP4 0 /* IMAP4 rev 0, RFC1730 */ @@ -25,10 +25,6 @@ #include <opie.h> #endif /* OPIE_ENABLE */ -#ifndef strstr /* glibc-2.1 declares this as a macro */ -extern char *strstr(const char *, const char *); /* needed on sysV68 R3V7.1. */ -#endif /* strstr */ - static int last; #ifdef SDPS_ENABLE char *sdps_envfrom; @@ -46,12 +42,12 @@ static char lastok[POPBUFSIZE+1]; #if defined(KERBEROS_V4) || defined(KERBEROS_V5) flag has_kerberos = FALSE; #endif /* defined(KERBEROS_V4) || defined(KERBEROS_V5) */ - flag has_cram = FALSE; + static flag has_cram = FALSE; #ifdef OPIE_ENABLE flag has_otp = FALSE; #endif /* OPIE_ENABLE */ #ifdef SSL_ENABLE - flag has_ssl = FALSE; + static flag has_ssl = FALSE; #endif /* SSL_ENABLE */ #ifdef NTLM_ENABLE @@ -157,7 +157,7 @@ serv_option : AKA alias_list #else current.server.authenticate = A_KERBEROS_V4; #endif /* KERBEROS_V5 */ -#if INET6_ENABLE +#ifdef INET6_ENABLE current.server.service = KPOP_PORT; #else /* INET6_ENABLE */ current.server.port = KPOP_PORT; @@ -179,12 +179,12 @@ serv_option : AKA alias_list | CHECKALIAS {current.server.checkalias = FLAG_TRUE;} | NO CHECKALIAS {current.server.checkalias = FLAG_FALSE;} | SERVICE STRING { -#if INET6_ENABLE +#ifdef INET6_ENABLE current.server.service = $2; #endif /* INET6_ENABLE */ } | PORT NUMBER { -#if INET6_ENABLE +#ifdef INET6_ENABLE int port = $2; char buf[10]; sprintf(buf, "%d", port); @@ -603,5 +603,3 @@ char *prependdir (const char *file, const char *dir) int yywrap(void) {return 1;} /* rcfile_y.y ends here */ - - @@ -41,7 +41,7 @@ /* If NULL, report will flush stderr, then print on stderr the program name, a colon and a space. Otherwise, report will call this function without parameters instead. */ -void (*report_print_progname) ( +static void (*report_print_progname) ( #if __STDC__ - 0 void #endif @@ -30,6 +30,7 @@ #include <varargs.h> #endif #include <ctype.h> +#include <langinfo.h> /* for W* macros after pclose() */ #define _USE_BSD @@ -507,7 +507,7 @@ va_dcl { static SSL_CTX *_ctx = NULL; static SSL *_ssl_context[FD_SETSIZE]; -SSL *SSLGetContext( int ); +static SSL *SSLGetContext( int ); #endif /* SSL_ENABLE */ int SockWrite(int sock, char *buf, int len) @@ -538,7 +538,9 @@ int SockRead(int sock, char *buf, int len) { char *newline, *bp = buf; int n; +#ifdef FORCE_STUFFING int maxavailable = 0; +#endif #ifdef SSL_ENABLE SSL *ssl; #endif @@ -578,7 +580,9 @@ int SockRead(int sock, char *buf, int len) (void)SSL_get_error(ssl, n); return(-1); } +#ifdef FORCE_STUFFING maxavailable = n; +#endif if( 0 == n ) { /* SSL_peek says no data... Does he mean no data or did the connection blow up? If we got an error @@ -622,7 +626,9 @@ int SockRead(int sock, char *buf, int len) if ((n = fm_peek(sock, bp, len)) <= 0) #endif return (-1); +#ifdef FORCE_STUFFING maxavailable = n; +#endif if ((newline = memchr(bp, '\n', n)) != NULL) n = newline - bp + 1; #ifndef __BEOS__ @@ -35,10 +35,6 @@ #include "socket.h" #include "fetchmail.h" -#ifndef strstr /* glibc-2.1 declares this as a macro */ -extern char *strstr(const char *, const char *); /* needed on sysV68 R3V7.1. */ -#endif /* strstr */ - int mytimeout; /* value of nonreponse timeout */ int suppress_tags; /* emit tags? */ char shroud[PASSWORDLEN*2+3]; /* string to shroud in debug output */ @@ -422,7 +418,7 @@ int readheaders(int sock, for (remaining = fetchlen; remaining > 0 || protocol->delimited; ) { char *line, *rline; - int overlong = FALSE; + int overlong = FALSE; /* XXX FIXME: this is unused */ line = xmalloc(sizeof(buf)); linelen = 0; |