diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2006-01-11 10:51:28 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2006-01-11 10:51:28 +0000 |
commit | 7ff1619df0d9c4fc58119bd23e8e6904679db8b6 (patch) | |
tree | 40990bea5032b5330125ece444a854efa5ac1f56 | |
parent | fa8953f9f0852d1bc9baaee927500a98998fb97b (diff) | |
download | fetchmail-7ff1619df0d9c4fc58119bd23e8e6904679db8b6.tar.gz fetchmail-7ff1619df0d9c4fc58119bd23e8e6904679db8b6.tar.bz2 fetchmail-7ff1619df0d9c4fc58119bd23e8e6904679db8b6.zip |
Fix a few compiler warnings through casts.
Make MD5Update argument const.
svn path=/branches/BRANCH_6-3/; revision=4621
-rw-r--r-- | conf.c | 6 | ||||
-rw-r--r-- | driver.c | 4 | ||||
-rw-r--r-- | fetchmail.h | 2 | ||||
-rw-r--r-- | md5.h | 2 | ||||
-rw-r--r-- | md5ify.c | 6 | ||||
-rw-r--r-- | odmr.c | 4 | ||||
-rw-r--r-- | socket.c | 2 |
7 files changed, 13 insertions, 13 deletions
@@ -103,7 +103,7 @@ static void listdump(const char *name, struct idlist *list) for (idp = list; idp; idp = idp->next) if (idp->id) { - fprintf(stdout, "\"%s\"", visbuf(idp->id)); + fprintf(stdout, "\"%s\"", visbuf((const char *)idp->id)); if (idp->next) fputs(", ", stdout); } @@ -325,9 +325,9 @@ void dump_config(struct runctl *runp, struct query *querylist) { char namebuf[USERNAMELEN + 1]; - strlcpy(namebuf, visbuf(idp->id), sizeof(namebuf)); + strlcpy(namebuf, visbuf((const char *)idp->id), sizeof(namebuf)); if (idp->val.id2) - fprintf(stdout, "(\"%s\", %s)", namebuf, visbuf(idp->val.id2)); + fprintf(stdout, "(\"%s\", %s)", namebuf, visbuf((const char *)idp->val.id2)); else fprintf(stdout, "\"%s\"", namebuf); if (idp->next) @@ -358,7 +358,7 @@ static void send_size_warnings(struct query *ctl) if (current->val.status.num == 0 && current->val.status.mark) { nbr = current->val.status.mark; - size = atoi(current->id); + size = atoi((const char *)current->id); if (ctl->limitflush) stuff_warning(NULL, ctl, GT_(" %d msg %d octets long deleted by fetchmail."), @@ -1304,7 +1304,7 @@ is restored.")); /* compute # of messages and number of new messages waiting */ stage = STAGE_GETRANGE; - err = (ctl->server.base_protocol->getrange)(mailserver_socket, ctl, idp->id, &count, &new, &bytes); + err = (ctl->server.base_protocol->getrange)(mailserver_socket, ctl, (const char *)idp->id, &count, &new, &bytes); if (err != 0) goto cleanUp; diff --git a/fetchmail.h b/fetchmail.h index dfafd2b5..4066facd 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -643,7 +643,7 @@ extern char currentwd[1024], rcfiledir[1024]; struct query *hostalloc(struct query *); int parsecmdline (int, char **, struct runctl *, struct query *); char *prependdir (const char *, const char *); -char *MD5Digest (unsigned char *); +char *MD5Digest (unsigned const char *); void hmac_md5 (unsigned char *, size_t, unsigned char *, size_t, unsigned char *, size_t); int POP3_auth_rpa(unsigned char *, unsigned char *, int socket); typedef RETSIGTYPE (*SIGHANDLERTYPE) (int); @@ -25,7 +25,7 @@ void MD5Update(struct MD5Context *context, unsigned char const *buf, void MD5Final(unsigned char digest[16], struct MD5Context *context); void MD5Transform(uint32 buf[4], uint32 const in[16]); -char *MD5Digest (unsigned char *s); +char *MD5Digest (unsigned const char *s); /* * This is needed to make RSAREF happy on some MS-DOS compilers. @@ -20,7 +20,7 @@ #include "md5.h" char * -MD5Digest (unsigned char *s) +MD5Digest (unsigned const char *s) { int i; MD5_CTX context; @@ -28,9 +28,9 @@ MD5Digest (unsigned char *s) static char ascii_digest [33]; MD5Init(&context); - MD5Update(&context, s, strlen(s)); + MD5Update(&context, s, strlen((const char *)s)); MD5Final(digest, &context); - + for (i = 0; i < 16; i++) sprintf(ascii_digest+2*i, "%02x", digest[i]); @@ -80,11 +80,11 @@ static int odmr_getrange(int sock, struct query *ctl, const char *id, */ buf[0] = '\0'; for (qnp = ctl->domainlist; qnp; qnp = qnp->next) - if (strlen(buf) + strlen(qnp->id) + 1 >= sizeof(buf)) + if (strlen(buf) + strlen((const char *)qnp->id) + 1 >= sizeof(buf)) break; else { - strcat(buf, qnp->id); + strcat(buf, (const char *)qnp->id); strcat(buf, ","); } buf[strlen(buf) - 1] = '\0'; /* nuke final comma */ @@ -659,7 +659,7 @@ static int SSL_verify_callback( int ok_return, X509_STORE_CTX *ctx, int strict ) for (i = 0, r = sk_GENERAL_NAME_num(gens); i < r; ++i) { const GENERAL_NAME *gn = sk_GENERAL_NAME_value(gens, i); if (gn->type == GEN_DNS) { - char *p1 = gn->d.ia5->data; + char *p1 = (char *)gn->d.ia5->data; char *p2 = _ssl_server_cname; if (outlevel >= O_VERBOSE) report(stderr, "Subject Alternative Name: %s\n", p1); |