changeset 5023:bf78471d6198 HEAD

Compiler warning fixes
author Timo Sirainen <tss@iki.fi>
date Thu, 18 Jan 2007 16:34:11 +0200
parents 2c60e03d2bf6
children a8a274b4c87c
files src/lib-index/mail-hash.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-hash.c	Thu Jan 18 01:33:29 2007 +0200
+++ b/src/lib-index/mail-hash.c	Thu Jan 18 16:34:11 2007 +0200
@@ -364,7 +364,7 @@
 	hash->dev = st.st_dev;
 	hash->ino = st.st_ino;
 
-	if (st.st_size < sizeof(*hash->hdr)) {
+	if (st.st_size < (off_t)sizeof(*hash->hdr)) {
 		mail_hash_set_corrupted(hash, "File too small");
 		return 0;
 	}
@@ -389,7 +389,7 @@
 		/* first read only the header. if the update counter hasn't
 		   changed we don't need to read the whole file */
 		if (st.st_mtime != hash->mapped_mtime) {
-			size = full ? st.st_size : sizeof(*hash->hdr);
+			size = full ? st.st_size : (off_t)sizeof(*hash->hdr);
 			if (mail_hash_file_read(hash, st.st_size, size) < 0)
 				return -1;