[dovecot-cvs] dovecot/src/lib-index mail-hash.c,1.32,1.33

tss at dovecot.org tss at dovecot.org
Thu Jan 18 14:34:13 UTC 2007


Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv17356

Modified Files:
	mail-hash.c 
Log Message:
Compiler warning fixes



Index: mail-hash.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-hash.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- mail-hash.c	28 Dec 2006 16:28:29 -0000	1.32
+++ mail-hash.c	18 Jan 2007 14:34:11 -0000	1.33
@@ -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;
 



More information about the dovecot-cvs mailing list