]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Compiler warning fixes.
authorTimo Sirainen <tss@iki.fi>
Wed, 5 Mar 2003 01:43:16 +0000 (03:43 +0200)
committerTimo Sirainen <tss@iki.fi>
Wed, 5 Mar 2003 01:43:16 +0000 (03:43 +0200)
--HG--
branch : HEAD

src/lib-storage/index/index-save.c
src/lib-storage/index/index-storage.h

index eeda6a707fb6add30eecd4783e8ea00331a6ae06..c18151201ffe4b79d180f346d6ce035a915da763 100644 (file)
@@ -22,9 +22,10 @@ struct save_header_context {
        int failed;
 };
 
-static int write_with_crlf(struct ostream *output, const unsigned char *data,
+static int write_with_crlf(struct ostream *output, const void *v_data,
                           size_t size)
 {
+       const unsigned char *data = v_data;
        size_t i, start;
 
        i_assert(size <= SSIZE_T_MAX);
@@ -56,9 +57,10 @@ static int write_with_crlf(struct ostream *output, const unsigned char *data,
        return size;
 }
 
-static int write_with_lf(struct ostream *output, const unsigned char *data,
+static int write_with_lf(struct ostream *output, const void *v_data,
                         size_t size)
 {
+       const unsigned char *data = v_data;
        size_t i, start;
 
        i_assert(size <= SSIZE_T_MAX);
@@ -139,7 +141,7 @@ int index_storage_save(struct mail_storage *storage, const char *path,
                       struct istream *input, struct ostream *output,
                       header_callback_t *header_callback, void *context)
 {
-       int (*write_func)(struct ostream *, const unsigned char *, size_t);
+       int (*write_func)(struct ostream *, const void *, size_t);
        const unsigned char *data;
        size_t size;
        ssize_t ret;
index 71aa2da8860c56538a341f6d1ffbdda7e50550b5..7bf527ec42c7b28fb1173d691fa3ace158907a83 100644 (file)
@@ -5,7 +5,7 @@
 #include "mail-index.h"
 #include "index-mail.h"
 
-typedef int write_func_t(struct ostream *, const unsigned char *, size_t);
+typedef int write_func_t(struct ostream *, const void *, size_t);
 
 /* Return -1 = failure, 0 = don't write the header, 1 = write it */
 typedef int header_callback_t(const unsigned char *name, size_t len,