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;
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)
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');
#include <com_err.h>
#endif /* KERBEROS_V5 */
+#include "socket.h"
#include "fetchmail.h"
#if INET6
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);
{
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"
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;
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 */
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]);
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)
{
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");
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);
*/
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' */
/* 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;
}
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
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 */