dovecot: Compiler warning fixes
dovecot at dovecot.org
dovecot at dovecot.org
Tue Sep 25 12:56:14 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/406c9a863f26
changeset: 6496:406c9a863f26
user: Timo Sirainen <tss at iki.fi>
date: Tue Sep 25 12:56:10 2007 +0300
description:
Compiler warning fixes
diffstat:
3 files changed, 11 insertions(+), 8 deletions(-)
src/imap/cmd-list.c | 6 +++---
src/lib-index/mailbox-list-index-sync.c | 3 +++
src/lib-otp/otp-hash.c | 10 +++++-----
diffs (99 lines):
diff -r 94501a17dcd0 -r 406c9a863f26 src/imap/cmd-list.c
--- a/src/imap/cmd-list.c Tue Sep 25 12:44:11 2007 +0300
+++ b/src/imap/cmd-list.c Tue Sep 25 12:56:10 2007 +0300
@@ -14,7 +14,7 @@ struct cmd_list_context {
struct client_command_context *cmd;
const char *ref;
const char *const *patterns;
- enum mailbox_list_flags list_flags;
+ enum mailbox_list_iter_flags list_flags;
enum mailbox_status_items status_items;
struct mail_namespace *ns;
@@ -91,7 +91,7 @@ static bool
static bool
parse_select_flags(struct cmd_list_context *ctx, const struct imap_arg *args)
{
- enum mailbox_list_flags list_flags = 0;
+ enum mailbox_list_iter_flags list_flags = 0;
const char *atom;
while (args->type != IMAP_ARG_EOL) {
@@ -130,7 +130,7 @@ static bool
static bool
parse_return_flags(struct cmd_list_context *ctx, const struct imap_arg *args)
{
- enum mailbox_list_flags list_flags = 0;
+ enum mailbox_list_iter_flags list_flags = 0;
const char *atom;
while (args->type != IMAP_ARG_EOL) {
diff -r 94501a17dcd0 -r 406c9a863f26 src/lib-index/mailbox-list-index-sync.c
--- a/src/lib-index/mailbox-list-index-sync.c Tue Sep 25 12:44:11 2007 +0300
+++ b/src/lib-index/mailbox-list-index-sync.c Tue Sep 25 12:56:10 2007 +0300
@@ -260,6 +260,7 @@ mailbox_list_index_sync_int(struct mailb
MODIFY_ADD, rec_flags);
mail_index_update_flags(ctx->trans, rec->seq,
MODIFY_REMOVE,
+ (enum mail_flags)
MAILBOX_LIST_INDEX_FLAG_NOCHILDREN);
}
@@ -290,6 +291,7 @@ mailbox_list_index_sync_int(struct mailb
rec->exists = TRUE;
mail_index_update_flags(ctx->trans, rec->seq,
MODIFY_REMOVE,
+ (enum mail_flags)
MAILBOX_LIST_INDEX_FLAG_NONEXISTENT);
break;
}
@@ -300,6 +302,7 @@ mailbox_list_index_sync_int(struct mailb
exists, this flag is removed later. */
mail_index_update_flags(ctx->trans, rec->seq,
MODIFY_ADD,
+ (enum mail_flags)
MAILBOX_LIST_INDEX_FLAG_NONEXISTENT);
}
diff -r 94501a17dcd0 -r 406c9a863f26 src/lib-otp/otp-hash.c
--- a/src/lib-otp/otp-hash.c Tue Sep 25 12:44:11 2007 +0300
+++ b/src/lib-otp/otp-hash.c Tue Sep 25 12:56:10 2007 +0300
@@ -79,7 +79,7 @@ static void sha1_fold(struct sha1_ctxt *
}
-#define F(name) ((void *) (name))
+#define F(name) ((void (*)()) (name))
static const struct digest digests[] = {
{ "md4", F(md4_init), F(md4_update), F(md4_final), F(md4_fold) },
@@ -112,7 +112,7 @@ int digest_init(struct digest_context *c
i_assert(algo < N_ELEMENTS(digests));
ctx->digest = digests + algo;
- ctx->digest->init((void *) &ctx->ctx);
+ ctx->digest->init(&ctx->ctx);
return 0;
}
@@ -120,17 +120,17 @@ void digest_update(struct digest_context
void digest_update(struct digest_context *ctx, const void *data,
const size_t size)
{
- ctx->digest->update((void *) &ctx->ctx, data, size);
+ ctx->digest->update(&ctx->ctx, data, size);
}
void digest_final(struct digest_context *ctx, unsigned char *result)
{
- ctx->digest->final((void *) &ctx->ctx, result);
+ ctx->digest->final(&ctx->ctx, result);
}
void digest_otp_final(struct digest_context *ctx, unsigned char *result)
{
- ctx->digest->otp_final((void *) &ctx->ctx, result);
+ ctx->digest->otp_final(&ctx->ctx, result);
}
void otp_hash(unsigned int algo, const char *seed, const char *passphrase,
More information about the dovecot-cvs
mailing list