changeset 1277:c5c17b45cceb HEAD

Compiler warning fixes.
author Timo Sirainen <tss@iki.fi>
date Wed, 05 Mar 2003 03:43:16 +0200
parents 3607a2b4f011
children 4d6c72dc34db
files src/lib-storage/index/index-save.c src/lib-storage/index/index-storage.h
diffstat 2 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/index-save.c	Wed Mar 05 03:41:36 2003 +0200
+++ b/src/lib-storage/index/index-save.c	Wed Mar 05 03:43:16 2003 +0200
@@ -22,9 +22,10 @@
 	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 @@
 	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 @@
 		       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;
--- a/src/lib-storage/index/index-storage.h	Wed Mar 05 03:41:36 2003 +0200
+++ b/src/lib-storage/index/index-storage.h	Wed Mar 05 03:43:16 2003 +0200
@@ -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,