Mercurial > dovecot > core-2.2
changeset 2629:6ba9dcff11b9 HEAD
Compiler warning fixes and cleanups
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 15 Sep 2004 16:20:16 +0300 |
parents | 59059ea978b2 |
children | 1c8410c8f602 |
files | src/auth/mech-apop.c src/auth/mech-rpa.c src/auth/mech.c src/imap-login/client-authenticate.c src/lib-storage/index/index-mail.c src/lib-storage/proxy-mailbox.c src/login-common/ssl-proxy-openssl.c src/pop3-login/client-authenticate.c |
diffstat | 8 files changed, 14 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/mech-apop.c Wed Sep 15 16:19:47 2004 +0300 +++ b/src/auth/mech-apop.c Wed Sep 15 16:20:16 2004 +0300 @@ -95,7 +95,7 @@ mech_auth_finish(auth_request, NULL, 0, FALSE); return TRUE; } - auth->challenge = p_strdup(auth->pool, data); + auth->challenge = p_strdup(auth->pool, (const char *)data); if (tmp != end) { username = ++tmp; @@ -114,7 +114,7 @@ } tmp++; - auth_request->user = p_strdup(auth->pool, username); + auth_request->user = p_strdup(auth->pool, (const char *)username); if (!mech_fix_username(auth_request->user, &error)) { if (verbose) { i_info("apop(%s): %s",
--- a/src/auth/mech-rpa.c Wed Sep 15 16:19:47 2004 +0300 +++ b/src/auth/mech-rpa.c Wed Sep 15 16:20:16 2004 +0300 @@ -320,7 +320,7 @@ } } -static const char * +static const unsigned char * mech_rpa_build_token2(struct rpa_auth_request *auth, const char *realms, size_t *size) { @@ -366,7 +366,7 @@ return buffer_free_without_data(buf); } -static const char * +static const unsigned char * mech_rpa_build_token4(struct rpa_auth_request *auth, size_t *size) { unsigned int length = sizeof(rpa_oid) + 17 + 17 + 1;
--- a/src/auth/mech.c Wed Sep 15 16:19:47 2004 +0300 +++ b/src/auth/mech.c Wed Sep 15 16:20:16 2004 +0300 @@ -17,9 +17,9 @@ const char *default_realm; const char *anonymous_username; char username_chars[256], username_translation[256]; +int ssl_require_client_cert; static int set_use_cyrus_sasl; -static int ssl_require_client_cert; static struct auth_client_request_reply failure_reply; static buffer_t *auth_failures_buf; @@ -467,11 +467,11 @@ env = getenv("USERNAME_CHARS"); if (env == NULL || *env == '\0') { /* all chars are allowed */ - memset(username_chars, 0xff, sizeof(username_chars)); + memset(username_chars, 1, sizeof(username_chars)); } else { memset(username_chars, 0, sizeof(username_chars)); for (; *env != '\0'; env++) - username_chars[((unsigned char)*env) & 0xff] = 0xff; + username_chars[((unsigned char)*env) & 0xff] = 1; } env = getenv("USERNAME_TRANSLATION");
--- a/src/imap-login/client-authenticate.c Wed Sep 15 16:19:47 2004 +0300 +++ b/src/imap-login/client-authenticate.c Wed Sep 15 16:20:16 2004 +0300 @@ -265,8 +265,7 @@ linelen = strlen(line); buf = buffer_create_static_hard(pool_datastack_create(), linelen); - if (base64_decode((const unsigned char *) line, linelen, - NULL, buf) <= 0) { + if (base64_decode(line, linelen, NULL, buf) <= 0) { /* failed */ client_auth_abort(client, "Invalid base64 data"); } else if (client->common.auth_request == NULL) {
--- a/src/lib-storage/index/index-mail.c Wed Sep 15 16:19:47 2004 +0300 +++ b/src/lib-storage/index/index-mail.c Wed Sep 15 16:20:16 2004 +0300 @@ -227,7 +227,8 @@ data->save_sent_date = TRUE; str = _mail->get_header(_mail, "Date"); if (data->sent_date.time == (time_t)-1) { - if (!message_date_parse(str, (size_t)-1, + if (!message_date_parse((const unsigned char *)str, + (size_t)-1, &data->sent_date.time, &tz)) { /* 0 == parse error */ data->sent_date.time = 0;
--- a/src/lib-storage/proxy-mailbox.c Wed Sep 15 16:19:47 2004 +0300 +++ b/src/lib-storage/proxy-mailbox.c Wed Sep 15 16:20:16 2004 +0300 @@ -45,7 +45,7 @@ { struct proxy_mailbox *p = (struct proxy_mailbox *) box; - return p->box->notify_changes(box, min_interval, callback, context); + p->box->notify_changes(box, min_interval, callback, context); } static struct mail *_fetch(struct mailbox_transaction_context *t, uint32_t seq,
--- a/src/login-common/ssl-proxy-openssl.c Wed Sep 15 16:19:47 2004 +0300 +++ b/src/login-common/ssl-proxy-openssl.c Wed Sep 15 16:20:16 2004 +0300 @@ -432,7 +432,7 @@ void ssl_proxy_init(void) { const char *cafile, *certfile, *keyfile, *paramfile, *cipher_list; - char buf; + unsigned char buf; cafile = getenv("SSL_CA_FILE"); certfile = getenv("SSL_CERT_FILE");
--- a/src/pop3-login/client-authenticate.c Wed Sep 15 16:19:47 2004 +0300 +++ b/src/pop3-login/client-authenticate.c Wed Sep 15 16:20:16 2004 +0300 @@ -258,8 +258,7 @@ linelen = strlen(line); buf = buffer_create_static_hard(pool_datastack_create(), linelen); - if (base64_decode((const unsigned char *) line, linelen, - NULL, buf) <= 0) { + if (base64_decode(line, linelen, NULL, buf) <= 0) { /* failed */ client_auth_abort(client, "Invalid base64 data"); } else if (client->common.auth_request == NULL) { @@ -322,8 +321,7 @@ argslen = strlen(args); buf = buffer_create_static_hard(pool_datastack_create(), argslen); - if (base64_decode((const unsigned char *)args, argslen, - NULL, buf) <= 0) { + if (base64_decode(args, argslen, NULL, buf) <= 0) { /* failed */ client_send_line(client, "-ERR Invalid base64 data."); return TRUE;