Mercurial > dovecot > original-hg > dovecot-1.2
diff src/lib-otp/otp-hash.c @ 6496:406c9a863f26 HEAD
Compiler warning fixes
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 25 Sep 2007 12:56:10 +0300 |
parents | 59490181469e |
children |
line wrap: on
line diff
--- 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 @@ } -#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 @@ 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 *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,