diff options
-rw-r--r-- | checkalias.c | 1 | ||||
-rw-r--r-- | conf.c | 8 | ||||
-rw-r--r-- | driver.c | 8 | ||||
-rw-r--r-- | etrn.c | 4 | ||||
-rw-r--r-- | fetchmail.c | 38 | ||||
-rw-r--r-- | fetchmail.h | 9 | ||||
-rw-r--r-- | imap.c | 8 | ||||
-rw-r--r-- | md5.h | 2 | ||||
-rw-r--r-- | netrc.c | 2 | ||||
-rw-r--r-- | odmr.c | 2 | ||||
-rw-r--r-- | opie.c | 2 | ||||
-rw-r--r-- | options.c | 14 | ||||
-rw-r--r-- | pop3.c | 16 | ||||
-rw-r--r-- | report.c | 18 | ||||
-rw-r--r-- | rfc822.c | 8 | ||||
-rw-r--r-- | socket.c | 9 | ||||
-rw-r--r-- | socket.h | 4 | ||||
-rw-r--r-- | transact.c | 8 | ||||
-rw-r--r-- | uid.c | 10 |
19 files changed, 84 insertions, 87 deletions
diff --git a/checkalias.c b/checkalias.c index cd5caca5..6aeda1bd 100644 --- a/checkalias.c +++ b/checkalias.c @@ -216,7 +216,6 @@ int is_host_alias(const char *name, struct query *ctl) #ifndef __BEOS__ case NO_ADDRESS: /* valid, but does not have an IP address */ return(FALSE); - break; #endif case NO_RECOVERY: /* non-recoverable name server error */ case TRY_AGAIN: /* temporary error on authoritative server */ @@ -180,13 +180,13 @@ void dump_config(struct runctl *runp, struct query *querylist) #ifdef SSL_ENABLE printf("'ssl',"); #endif /* SSL_ENABLE */ -#if OPIE_ENABLE +#ifdef OPIE_ENABLE printf("'opie',"); #endif /* OPIE_ENABLE */ -#if INET6_ENABLE +#ifdef INET6_ENABLE printf("'inet6',"); #endif /* INET6_ENABLE */ -#if NET_SECURITY +#ifdef NET_SECURITY printf("'netsec',"); #endif /* NET_SECURITY */ printf(")\n"); @@ -247,7 +247,7 @@ void dump_config(struct runctl *runp, struct query *querylist) using_kpop = (ctl->server.protocol == P_POP3 && -#if !INET6_ENABLE +#ifndef INET6_ENABLE ctl->server.port == KPOP_PORT && #else ctl->server.service && !strcmp(ctl->server.service, KPOP_PORT ) && @@ -926,7 +926,7 @@ static int do_session( { char buf[MSGBUFSIZE+1], *realhost; int count, new, bytes; -#if INET6_ENABLE +#ifdef INET6_ENABLE int fetches, dispatches, oldphase; #else /* INET6_ENABLE */ int port, fetches, dispatches, oldphase; @@ -946,7 +946,7 @@ static int do_session( oldphase = phase; phase = OPEN_WAIT; set_timeout(mytimeout); -#if !INET6_ENABLE +#ifndef INET6_ENABLE #ifdef SSL_ENABLE port = ctl->server.port ? ctl->server.port : ( ctl->use_ssl ? ctl->server.base_protocol->sslport : ctl->server.base_protocol->port ); #else @@ -1037,7 +1037,7 @@ static int do_session( /* allow time for the port to be set up if we have a plugin */ if (ctl->server.plugin) (void)sleep(1); -#if INET6_ENABLE +#ifdef INET6_ENABLE if ((mailserver_socket = SockOpen(realhost, ctl->server.service ? ctl->server.service : ( ctl->use_ssl ? ctl->server.base_protocol->sslservice : ctl->server.base_protocol->service ), ctl->server.netsec, ctl->server.plugin)) == -1) @@ -1046,7 +1046,7 @@ static int do_session( #endif /* INET6_ENABLE */ { char errbuf[BUFSIZ]; -#if !INET6_ENABLE +#ifndef INET6_ENABLE int err_no = errno; #ifdef HAVE_RES_SEARCH if (err_no != 0 && h_errno != 0) @@ -65,7 +65,7 @@ static int etrn_getrange(int sock, struct query *ctl, const char *id, for (qnp = ctl->domainlist; qnp; qnp = qnp->next) { /* ship the actual poll and get the response */ - gen_send(sock, "ETRN %s", qnp->id); + gen_send(sock, "ETRN %s", (char *)qnp->id); if ((ok = gen_recv(sock, buf, sizeof(buf)))) return(ok); @@ -122,7 +122,7 @@ static int etrn_logout(int sock, struct query *ctl) static const struct method etrn = { "ETRN", /* ESMTP ETRN extension */ -#if INET6_ENABLE +#ifdef INET6_ENABLE "smtp", /* standard SMTP port */ "smtps", /* ssl SMTP port */ #else /* INET6_ENABLE */ diff --git a/fetchmail.c b/fetchmail.c index fd093690..173449c1 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -62,7 +62,7 @@ char *program_name; /* the name to prefix error messages with */ flag configdump; /* dump control blocks for configurator */ char *fetchmailhost; /* either `localhost' or the host's FQDN */ -#if NET_SECURITY +#ifdef NET_SECURITY void *request = NULL; int requestlen = 0; #endif /* NET_SECURITY */ @@ -216,19 +216,19 @@ int main(int argc, char **argv) #ifdef SSL_ENABLE printf("+SSL"); #endif -#if OPIE_ENABLE +#ifdef OPIE_ENABLE printf("+OPIE"); #endif /* OPIE_ENABLE */ -#if INET6_ENABLE +#ifdef INET6_ENABLE printf("+INET6"); #endif /* INET6_ENABLE */ -#if NET_SECURITY +#ifdef NET_SECURITY printf("+NETSEC"); #endif /* NET_SECURITY */ #ifdef HAVE_SOCKS printf("+SOCKS"); #endif /* HAVE_SOCKS */ -#if ENABLE_NLS +#ifdef ENABLE_NLS printf("+NLS"); #endif /* ENABLE_NLS */ putchar('\n'); @@ -630,7 +630,7 @@ int main(int argc, char **argv) } } -#if (defined(linux) && !INET6_ENABLE) || defined(__FreeBSD__) +#if (defined(linux) && !defined(INET6_ENABLE)) || defined(__FreeBSD__) /* * Don't do monitoring if we were woken by a signal. * Note that interface_approve() does its own error logging. @@ -694,7 +694,7 @@ int main(int argc, char **argv) break; } -#if (defined(linux) && !INET6_ENABLE) || defined (__FreeBSD__) +#if (defined(linux) && !defined(INET6_ENABLE)) || defined (__FreeBSD__) if (ctl->server.monitor) { /* @@ -825,7 +825,7 @@ static void optmerge(struct query *h2, struct query *h1, int force) #define FLAG_MERGE(fld) if (force ? !!h1->fld : !h2->fld) h2->fld = h1->fld FLAG_MERGE(server.via); FLAG_MERGE(server.protocol); -#if INET6_ENABLE +#ifdef INET6_ENABLE FLAG_MERGE(server.service); FLAG_MERGE(server.netsec); #else /* INET6_ENABLE */ @@ -1156,7 +1156,7 @@ static int load_params(int argc, char **argv, int optind) if (ctl->server.timeout == -1) ctl->server.timeout = CLIENT_TIMEOUT; -#if !INET6_ENABLE +#ifndef INET6_ENABLE /* sanity checks */ if (ctl->server.port < 0) { @@ -1499,7 +1499,7 @@ static void dump_params (struct runctl *runp, } if (ctl->server.protocol == P_POP3 -#if INET6_ENABLE +#ifdef INET6_ENABLE && ctl->server.service && !strcmp(ctl->server.service, KPOP_PORT) #else /* INET6_ENABLE */ && ctl->server.port == KPOP_PORT @@ -1510,7 +1510,7 @@ static void dump_params (struct runctl *runp, ctl->server.authenticate == A_KERBEROS_V5 ? "V" : "IV"); else printf(GT_(" Protocol is %s"), showproto(ctl->server.protocol)); -#if INET6_ENABLE +#ifdef INET6_ENABLE if (ctl->server.service) printf(GT_(" (using service %s)"), ctl->server.service); if (ctl->server.netsec) @@ -1587,7 +1587,7 @@ static void dump_params (struct runctl *runp, printf(GT_(" Selected mailboxes are:")); for (idp = ctl->mailboxes; idp; idp = idp->next) - printf(" %s", idp->id); + printf(" %s", (char *)idp->id); printf("\n"); } printf(GT_(" %s messages will be retrieved (--all %s).\n"), @@ -1674,7 +1674,7 @@ static void dump_params (struct runctl *runp, printf(GT_(" Domains for which mail will be fetched are:")); for (idp = ctl->domainlist; idp; idp = idp->next) { - printf(" %s", idp->id); + printf(" %s", (char *)idp->id); if (!idp->val.status.mark) printf(GT_(" (default)")); } @@ -1694,7 +1694,7 @@ static void dump_params (struct runctl *runp, ctl->listener); for (idp = ctl->smtphunt; idp; idp = idp->next) { - printf(" %s", idp->id); + printf(" %s", (char *)idp->id); if (!idp->val.status.mark) printf(GT_(" (default)")); } @@ -1752,9 +1752,9 @@ static void dump_params (struct runctl *runp, { for (idp = ctl->localnames; idp; idp = idp->next) if (idp->val.id2) - printf("\t%s -> %s\n", idp->id, idp->val.id2); + printf("\t%s -> %s\n", (char *)idp->id, (char *)idp->val.id2); else - printf("\t%s\n", idp->id); + printf("\t%s\n", (char *)idp->id); if (ctl->wildcard) fputs("\t*\n", stdout); } @@ -1793,7 +1793,7 @@ static void dump_params (struct runctl *runp, printf(GT_(" Predeclared mailserver aliases:")); for (idp = ctl->server.akalist; idp; idp = idp->next) - printf(" %s", idp->id); + printf(" %s", (char *)idp->id); putchar('\n'); } if (ctl->server.localdomains) @@ -1802,7 +1802,7 @@ static void dump_params (struct runctl *runp, printf(GT_(" Local domains:")); for (idp = ctl->server.localdomains; idp; idp = idp->next) - printf(" %s", idp->id); + printf(" %s", (char *)idp->id); putchar('\n'); } } @@ -1843,7 +1843,7 @@ static void dump_params (struct runctl *runp, printf(GT_(" %d UIDs saved.\n"), count); if (outlevel >= O_VERBOSE) for (idp = ctl->oldsaved; idp; idp = idp->next) - printf("\t%s\n", idp->id); + printf("\t%s\n", (char *)idp->id); } } diff --git a/fetchmail.h b/fetchmail.h index c9d273ea..146b1712 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -32,7 +32,7 @@ #define P_ETRN 7 #define P_ODMR 8 -#if INET6_ENABLE +#ifdef INET6_ENABLE #define SMTP_PORT "smtp" #define KPOP_PORT "kpop" #else /* INET6_ENABLE */ @@ -179,7 +179,7 @@ struct query; struct method /* describe methods for protocol state machine */ { const char *name; /* protocol name */ -#if INET6_ENABLE +#ifdef INET6_ENABLE const char *service; const char *sslservice; #else /* INET6_ENABLE */ @@ -223,7 +223,7 @@ struct hostdata /* shared among all user connections to given server */ struct idlist *akalist; /* server name first, then akas */ struct idlist *localdomains; /* list of pass-through domains */ int protocol; /* protocol type */ -#if INET6_ENABLE +#ifdef INET6_ENABLE char *service; /* IPv6 service name */ void *netsec; /* IPv6 security request */ #else /* INET6_ENABLE */ @@ -692,4 +692,7 @@ char *strerror (int); #define ROOT_UID 0 #endif /* __CYGWIN__ */ +extern int mailserver_socket_temp; +extern char *program_name; + /* fetchmail.h ends here */ @@ -19,7 +19,7 @@ #include "i18n.h" -#if OPIE_ENABLE +#ifdef OPIE_ENABLE #endif /* OPIE_ENABLE */ #ifndef strstr /* glibc-2.1 declares this as a macro */ @@ -162,7 +162,7 @@ static int imap_ok(int sock, char *argbuf) } } -#if NTLM_ENABLE +#ifdef NTLM_ENABLE #include "ntlm.h" static tSmbNtlmAuthRequest request; @@ -440,7 +440,7 @@ static int imap_getauth(int sock, struct query *ctl, char *greeting) return ok; } -#if OPIE_ENABLE +#ifdef OPIE_ENABLE if ((ctl->server.authenticate == A_ANY || ctl->server.authenticate == A_OTP) && strstr(capabilities, "AUTH=X-OTP")) @@ -1113,7 +1113,7 @@ static int imap_logout(int sock, struct query *ctl) static const struct method imap = { "IMAP", /* Internet Message Access Protocol */ -#if INET6_ENABLE +#ifdef INET6_ENABLE "imap", "imaps", #else /* INET6_ENABLE */ @@ -5,6 +5,8 @@ #define HEADER_MD5_H #endif +#include "config.h" + #if SIZEOF_INT == 4 typedef unsigned int uint32; #else @@ -347,7 +347,7 @@ int main (int argc, char **argv) if (host && login) { - int i, status; + int status; status = 0; printf("Host: %s, Login: %s\n", host, login); @@ -210,7 +210,7 @@ static int odmr_logout(int sock, struct query *ctl) static const struct method odmr = { "ODMR", /* ODMR protocol */ -#if INET6_ENABLE +#ifdef INET6_ENABLE "odmr", /* standard SMTP port */ "odmrs", /* ssl SMTP port */ #else /* INET6_ENABLE */ @@ -17,7 +17,7 @@ #include "i18n.h" #include "md5.h" -#if OPIE_ENABLE +#ifdef OPIE_ENABLE #include <opie.h> int do_otp(int sock, char *command, struct query *ctl) @@ -165,7 +165,7 @@ static const struct option longoptions[] = { {"principal", required_argument, (int *) 0, LA_PRINCIPAL }, -#if (defined(linux) && !INET6_ENABLE) || defined(__FreeBSD__) +#if (defined(linux) && !defined(INET6_ENABLE)) || defined(__FreeBSD__) {"interface", required_argument, (int *) 0, LA_INTERFACE }, {"monitor", required_argument, (int *) 0, LA_MONITOR }, #endif /* (defined(linux) && !INET6_ENABLE) || defined(__FreeBSD__) */ @@ -362,7 +362,7 @@ struct query *ctl; /* option record to be initialized */ else if (strcasecmp(optarg,"kpop") == 0) { ctl->server.protocol = P_POP3; -#if INET6_ENABLE +#ifdef INET6_ENABLE ctl->server.service = KPOP_PORT; #else /* INET6_ENABLE */ ctl->server.port = KPOP_PORT; @@ -390,7 +390,7 @@ struct query *ctl; /* option record to be initialized */ break; case 'P': case LA_PORT: -#if INET6_ENABLE +#ifdef INET6_ENABLE ctl->server.service = optarg; #else /* INET6_ENABLE */ ctl->server.port = xatoi(optarg, &errflag); @@ -561,7 +561,7 @@ struct query *ctl; /* option record to be initialized */ case 'T': case LA_NETSEC: -#if NET_SECURITY +#ifdef NET_SECURITY ctl->server.netsec = (void *)optarg; #else fprintf(stderr, GT_("fetchmail: network security support is disabled\n")); @@ -569,7 +569,7 @@ struct query *ctl; /* option record to be initialized */ #endif /* NET_SECURITY */ break; -#if (defined(linux) && !INET6_ENABLE) || defined(__FreeBSD__) +#if (defined(linux) && !defined(INET6_ENABLE)) || defined(__FreeBSD__) case 'I': case LA_INTERFACE: interface_parse(optarg, &ctl->server); @@ -675,7 +675,7 @@ struct query *ctl; /* option record to be initialized */ P(GT_(" -i, --idfile specify alternate UIDs file\n")); P(GT_(" --postmaster specify recipient of last resort\n")); P(GT_(" --nobounce redirect bounces from user to postmaster.\n")); -#if (defined(linux) && !INET6_ENABLE) || defined(__FreeBSD__) +#if (defined(linux) && !defined(INET6_ENABLE)) || defined(__FreeBSD__) P(GT_(" -I, --interface interface required specification\n")); P(GT_(" -M, --monitor monitor interface for activity\n")); #endif @@ -707,7 +707,7 @@ struct query *ctl; /* option record to be initialized */ P(GT_(" -l, --limit don't fetch messages over given size\n")); P(GT_(" -w, --warnings interval between warning mail notification\n")); -#if NET_SECURITY +#ifdef NET_SECURITY P(GT_(" -T, --netsec set IP security request\n")); #endif /* NET_SECURITY */ P(GT_(" -S, --smtphost set SMTP forwarding host\n")); @@ -21,7 +21,7 @@ #include "socket.h" #include "i18n.h" -#if OPIE_ENABLE +#ifdef OPIE_ENABLE #include <opie.h> #endif /* OPIE_ENABLE */ @@ -35,7 +35,7 @@ char *sdps_envfrom; char *sdps_envto; #endif /* SDPS_ENABLE */ -#if OPIE_ENABLE +#ifdef OPIE_ENABLE static char lastok[POPBUFSIZE+1]; #endif /* OPIE_ENABLE */ @@ -54,7 +54,7 @@ static char lastok[POPBUFSIZE+1]; flag has_ssl = FALSE; #endif /* SSL_ENABLE */ -#if NTLM_ENABLE +#ifdef NTLM_ENABLE #include "ntlm.h" static tSmbNtlmAuthRequest request; @@ -156,7 +156,7 @@ static int pop3_ok (int sock, char *argbuf) if (strcmp(buf,"+OK") == 0) { -#if OPIE_ENABLE +#ifdef OPIE_ENABLE strcpy(lastok, bufp); #endif /* OPIE_ENABLE */ ok = 0; @@ -274,7 +274,7 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting) int ok; char *start,*end; char *msg; -#if OPIE_ENABLE +#ifdef OPIE_ENABLE char *challenge; #endif /* OPIE_ENABLE */ #ifdef SSL_ENABLE @@ -440,7 +440,7 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting) * rather than doing SASL. */ if (has_kerberos && -#if INET6_ENABLE +#ifdef INET6_ENABLE ctl->server.service && (strcmp(ctl->server.service, KPOP_PORT)!=0) #else /* INET6_ENABLE */ ctl->server.port != KPOP_PORT @@ -488,7 +488,7 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting) /* ordinary validation, no one-time password or RPA */ gen_transact(sock, "USER %s", ctl->remotename); -#if OPIE_ENABLE +#ifdef OPIE_ENABLE /* see RFC1938: A One-Time Password System */ if (challenge = strstr(lastok, "otp-")) { char response[OPIE_RESPONSE_MAX+1]; @@ -1182,7 +1182,7 @@ static int pop3_logout(int sock, struct query *ctl) static const struct method pop3 = { "POP3", /* Post Office Protocol v3 */ -#if INET6_ENABLE +#ifdef INET6_ENABLE "pop3", /* standard POP3 port */ "pop3s", /* ssl POP3 port */ #else /* INET6_ENABLE */ @@ -22,7 +22,7 @@ #include "i18n.h" #include "fetchmail.h" -#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC || HAVE_STDARG_H +#if defined(HAVE_VPRINTF) || defined(HAVE_DOPRNT) || defined(_LIBC) || defined(HAVE_STDARG_H) # if HAVE_STDARG_H # include <stdarg.h> # define VA_START(args, lastarg) va_start(args, lastarg) @@ -66,10 +66,6 @@ static unsigned int report_message_count; #else -/* The calling program should define program_name and set it to the - name of the executing program. */ -extern char *program_name; - # if !HAVE_STRERROR && !defined(strerror) char *strerror (int errnum) { @@ -156,7 +152,7 @@ report (FILE *errfp, message, va_alist) #ifdef VA_START VA_START (args, message); -# if HAVE_VPRINTF || _LIBC +# if defined(HAVE_VPRINTF) || defined(_LIBC) vfprintf (errfp, message, args); # else _doprnt (message, args, errfp); @@ -239,7 +235,7 @@ report_build (FILE *errfp, message, va_alist) #if defined(VA_START) VA_START (args, message); -#if HAVE_VSNPRINTF || _LIBC +#if defined(HAVE_VSNPRINTF) || defined(_LIBC) for ( ; ; ) { n = vsnprintf (partial_message + partial_message_size_used, @@ -339,7 +335,7 @@ report_complete (FILE *errfp, message, va_alist) #if defined(VA_START) VA_START (args, message); -#if HAVE_VSNPRINTF || _LIBC +#if defined(HAVE_VSNPRINTF) || defined(_LIBC) for ( ; ; ) { n = vsnprintf (partial_message + partial_message_size_used, @@ -412,7 +408,7 @@ report_complete (FILE *errfp, message, va_alist) /* Sometimes we want to have at most one error per line. This variable controls whether this mode is selected or not. */ -int error_one_per_line; +static int error_one_per_line; void #ifdef HAVE_STDARG_H @@ -459,11 +455,11 @@ report_at_line (FILE *errfp, errnum, file_name, line_number, message, va_alist) } if (file_name != NULL) - fprintf (errfp, "%s:%d: ", file_name, line_number); + fprintf (errfp, "%s:%u: ", file_name, line_number); #ifdef VA_START VA_START (args, message); -# if HAVE_VPRINTF || _LIBC +# if defined(HAVE_VPRINTF) || defined(_LIBC) vfprintf (errfp, message, args); # else _doprnt (message, args, errfp); @@ -95,7 +95,7 @@ unsigned char *reply_hack( #ifdef MAIN if (verbose) { - printf("state %d: %s", state, buf); + printf("state %d: %s", state, (char *)buf); printf("%*s^\n", from - buf + 10, " "); } #endif /* MAIN */ @@ -252,7 +252,7 @@ unsigned char *nxtaddr(const unsigned char *hdr /* header to be parsed, NUL to c #ifdef MAIN if (verbose) { - printf("state %d: %s", state, orighdr); + printf("state %d: %s", state, (char *)orighdr); printf("%*s^\n", hp - orighdr + 10, " "); } #endif /* MAIN */ @@ -398,12 +398,12 @@ static void parsebuf(unsigned char *longbuf, int reply) if (reply) { reply_hack(longbuf, "HOSTNAME.NET", &dummy); - printf("Rewritten buffer: %s", longbuf); + printf("Rewritten buffer: %s", (char *)longbuf); } else if ((cp = nxtaddr(longbuf)) != (unsigned char *)NULL) do { - printf("\t-> \"%s\"\n", cp); + printf("\t-> \"%s\"\n", (char *)cp); } while ((cp = nxtaddr((unsigned char *)NULL)) != (unsigned char *)NULL); } @@ -73,9 +73,7 @@ static int h_errno; #endif /* ndef h_errno */ -extern int mailserver_socket_temp; /* Socket to close if connect timeout */ - -#if NET_SECURITY +#ifdef NET_SECURITY #include <net/security.h> #endif /* NET_SECURITY */ @@ -171,7 +169,6 @@ static int handle_plugin(const char *host, /* error */ report(stderr, GT_("fetchmail: fork failed\n")); return -1; - break; case 0: /* child */ /* fds[1] is the parent's end; close it for proper EOF ** detection */ @@ -258,13 +255,13 @@ int UnixOpen(const char *path) return sock; } -#if INET6_ENABLE +#ifdef INET6_ENABLE int SockOpen(const char *host, const char *service, const char *options, const char *plugin) { struct addrinfo *ai, *ai0, req; int i; -#if NET_SECURITY +#ifdef NET_SECURITY void *request = NULL; int requestlen; #endif /* NET_SECURITY */ @@ -8,7 +8,7 @@ #define SOCKET__ /* Create a new client socket; returns (FILE *)NULL on error */ -#if INET6_ENABLE +#ifdef INET6_ENABLE int SockOpen(const char *host, const char *service, const char *options, const char *plugin); #else /* INET6_ENABLE */ @@ -63,7 +63,7 @@ FIXME: document this */ int UnixOpen(const char *path); -#if SSL_ENABLE +#ifdef SSL_ENABLE int SSLOpen(int sock, char *mycert, char *mykey, char *myproto, int certck, char *certpath, char *fingerprint, char *servercname, char *label); #endif /* SSL_ENABLE */ @@ -1135,10 +1135,10 @@ int readheaders(int sock, #endif /* HAVE_SNPRINTF */ "Received: from %s [%u.%u.%u.%u]\r\n", ctl->server.truename, - (unsigned char)ctl->server.trueaddr[0], - (unsigned char)ctl->server.trueaddr[1], - (unsigned char)ctl->server.trueaddr[2], - (unsigned char)ctl->server.trueaddr[3]); + (unsigned int)(unsigned char)ctl->server.trueaddr[0], + (unsigned int)(unsigned char)ctl->server.trueaddr[1], + (unsigned int)(unsigned char)ctl->server.trueaddr[2], + (unsigned int)(unsigned char)ctl->server.trueaddr[3]); } else { #ifdef HAVE_SNPRINTF snprintf(buf, sizeof(buf), @@ -248,7 +248,7 @@ void initialize_saved_lists(struct query *hostlist, const char *idfile) report_build(stdout, GT_("Old UID list from %s:"), ctl->server.pollname); for (idp = ctl->oldsaved; idp; idp = idp->next) - report_build(stdout, " %s", idp->id); + report_build(stdout, " %s", (char *)idp->id); if (!idp) report_build(stdout, GT_(" <empty>")); report_complete(stdout, "\n"); @@ -259,7 +259,7 @@ void initialize_saved_lists(struct query *hostlist, const char *idfile) { report_build(stdout, GT_("Scratch list of UIDs:")); for (idp = scratchlist; idp; idp = idp->next) - report_build(stdout, " %s", idp->id); + report_build(stdout, " %s", (char *)idp->id); if (!idp) report_build(stdout, GT_(" <empty>")); report_complete(stdout, "\n"); @@ -513,7 +513,7 @@ void uid_swap_lists(struct query *ctl) else report_build(stdout, GT_("New UID list from %s:"), ctl->server.pollname); for (idp = dofastuidl ? ctl->oldsaved : ctl->newsaved; idp; idp = idp->next) - report_build(stdout, " %s = %d", idp->id, idp->val.status.mark); + report_build(stdout, " %s = %d", (char *)idp->id, idp->val.status.mark); if (!idp) report_build(stdout, GT_(" <empty>")); report_complete(stdout, "\n"); @@ -562,7 +562,7 @@ void uid_discard_new_list(struct query *ctl) * poll are marked here. */ report_build(stdout, GT_("Merged UID list from %s:"), ctl->server.pollname); for (idp = ctl->oldsaved; idp; idp = idp->next) - report_build(stdout, " %s = %d", idp->id, idp->val.status.mark); + report_build(stdout, " %s = %d", (char *)idp->id, idp->val.status.mark); if (!idp) report_build(stdout, GT_(" <empty>")); report_complete(stdout, "\n"); @@ -621,7 +621,7 @@ void write_saved_lists(struct query *hostlist, const char *idfile) if (idp->val.status.mark == UID_SEEN || idp->val.status.mark == UID_DELETED) fprintf(tmpfp, "%s@%s %s\n", - ctl->remotename, ctl->server.queryname, idp->id); + ctl->remotename, ctl->server.queryname, (char *)idp->id); } for (idp = scratchlist; idp; idp = idp->next) fputs(idp->id, tmpfp); |