[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.203, 1.204

tss at dovecot.org tss at dovecot.org
Wed Mar 14 18:18:01 EET 2007


Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv11507/lib-storage/index/mbox

Modified Files:
	mbox-sync.c 
Log Message:
Added casts to some enums to avoid compiler warnings.



Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.203
retrieving revision 1.204
diff -u -d -r1.203 -r1.204
--- mbox-sync.c	10 Mar 2007 16:05:48 -0000	1.203
+++ mbox-sync.c	14 Mar 2007 16:17:58 -0000	1.204
@@ -206,18 +206,17 @@
 				if (mail_index_lookup_uid_range(
 						sync_ctx->sync_view,
 						sync_rec->uid1, sync_rec->uid2,
-						&seq1, &seq2) < 0) {
+						&seq1, &seq2) < 0)
 					return -1;
-				}
+				memset(sync_rec, 0, sizeof(*sync_rec));
 
-				if (seq1 > 0) {
-					mail_index_update_flags_range(
-						sync_ctx->t,
-						seq1, seq2, MODIFY_ADD,
-						MAIL_INDEX_MAIL_FLAG_DIRTY);
-				}
+				if (seq1 == 0)
+					break;
 
-				memset(sync_rec, 0, sizeof(*sync_rec));
+				mail_index_update_flags_range(sync_ctx->t,
+					seq1, seq2, MODIFY_ADD,
+					(enum mail_flags)
+						MAIL_INDEX_MAIL_FLAG_DIRTY);
 			}
 			break;
 		}
@@ -510,7 +509,8 @@
 				mail_index_update_flags(sync_ctx->t,
 					sync_ctx->idx_seq,
 					dirty ? MODIFY_ADD : MODIFY_REMOVE,
-					MAIL_INDEX_MAIL_FLAG_DIRTY);
+					(enum mail_flags)
+						MAIL_INDEX_MAIL_FLAG_DIRTY);
 			}
 		}
 



More information about the dovecot-cvs mailing list