changeset 15080:e708a1d691d3

Compiler warning fixes for 32bit systems.
author Timo Sirainen <tss@iki.fi>
date Sun, 16 Sep 2012 16:12:03 +0300
parents 925d4a890a9b
children 4b0cbecf369d
files src/director/user-directory.c src/doveadm/dsync/dsync-mailbox-tree-sync.c src/lib-storage/index/dbox-common/dbox-storage.c src/lib-storage/index/dbox-multi/mdbox-map.c src/lib-storage/index/maildir/maildir-storage.c src/lib-storage/list/mailbox-list-index.c src/lib/json-parser.c
diffstat 7 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/director/user-directory.c	Sun Sep 16 16:08:18 2012 +0300
+++ b/src/director/user-directory.c	Sun Sep 16 16:12:03 2012 +0300
@@ -88,7 +88,7 @@
 				struct user *pos, struct user *user)
 {
 	for (; pos != NULL; pos = pos->prev) {
-		if ((time_t)pos->timestamp <= user->timestamp)
+		if (pos->timestamp <= user->timestamp)
 			break;
 	}
 	if (pos == NULL)
@@ -109,7 +109,7 @@
 			       struct user *pos, struct user *user)
 {
 	for (; pos != NULL; pos = pos->next) {
-		if ((time_t)pos->timestamp >= user->timestamp)
+		if (pos->timestamp >= user->timestamp)
 			break;
 	}
 	if (pos == NULL)
@@ -152,7 +152,7 @@
 		if (dir->prev_insert_pos == NULL) {
 			/* find the position starting from tail */
 			user_directory_insert_backwards(dir, dir->tail, user);
-		} else if (timestamp < dir->prev_insert_pos->timestamp) {
+		} else if (timestamp < (time_t)dir->prev_insert_pos->timestamp) {
 			user_directory_insert_backwards(dir, dir->prev_insert_pos,
 							user);
 		} else {
--- a/src/doveadm/dsync/dsync-mailbox-tree-sync.c	Sun Sep 16 16:08:18 2012 +0300
+++ b/src/doveadm/dsync/dsync-mailbox-tree-sync.c	Sun Sep 16 16:12:03 2012 +0300
@@ -326,7 +326,7 @@
 		 -<suffix> from it */
 		p = strrchr(node->name, '-');
 		i_assert(p != NULL);
-		if (max_prefix_len > p - node->name)
+		if (max_prefix_len > (size_t)(p - node->name))
 			max_prefix_len = p - node->name;
 	}
 	str_append_n(&buf, node->name, max_prefix_len);
@@ -807,7 +807,7 @@
 	i_assert(p != NULL);
 	p++;
 	max_prefix_len = TEMP_MAX_NAME_LEN - strlen(new_suffix) - 1;
-	if (max_prefix_len > p-node->name)
+	if (max_prefix_len > (size_t)(p-node->name))
 		max_prefix_len = p-node->name;
 	str_append_n(str, node->name, max_prefix_len);
 	str_append(str, new_suffix);
--- a/src/lib-storage/index/dbox-common/dbox-storage.c	Sun Sep 16 16:08:18 2012 +0300
+++ b/src/lib-storage/index/dbox-common/dbox-storage.c	Sun Sep 16 16:12:03 2012 +0300
@@ -155,7 +155,7 @@
 	} else if (st.st_atime > st.st_ctime + DBOX_TMP_DELETE_SECS) {
 		/* there haven't been any changes to this directory since we
 		   last checked it. */
-	} else if (st.st_atime < ioloop_time - interval) {
+	} else if (st.st_atime < ioloop_time - (time_t)interval) {
 		/* time to scan */
 		const char *prefix =
 			mailbox_list_get_global_temp_prefix(list);
--- a/src/lib-storage/index/dbox-multi/mdbox-map.c	Sun Sep 16 16:08:18 2012 +0300
+++ b/src/lib-storage/index/dbox-multi/mdbox-map.c	Sun Sep 16 16:12:03 2012 +0300
@@ -144,7 +144,7 @@
 	} else if (st.st_atime > st.st_ctime + DBOX_TMP_DELETE_SECS) {
 		/* there haven't been any changes to this directory since we
 		   last checked it. */
-	} else if (st.st_atime < ioloop_time - interval) {
+	} else if (st.st_atime < ioloop_time - (time_t)interval) {
 		/* time to scan */
 		(void)unlink_old_files(map->path, DBOX_TEMP_FILE_PREFIX,
 				       ioloop_time - DBOX_TMP_DELETE_SECS);
--- a/src/lib-storage/index/maildir/maildir-storage.c	Sun Sep 16 16:08:18 2012 +0300
+++ b/src/lib-storage/index/maildir/maildir-storage.c	Sun Sep 16 16:12:03 2012 +0300
@@ -222,7 +222,7 @@
 	} else if (st.st_atime > st.st_ctime + MAILDIR_TMP_DELETE_SECS) {
 		/* the directory should be empty. we won't do anything
 		   until ctime changes. */
-	} else if (st.st_atime < ioloop_time - interval) {
+	} else if (st.st_atime < ioloop_time - (time_t)interval) {
 		/* time to scan */
 		(void)unlink_old_files(path, "",
 				       ioloop_time - MAILDIR_TMP_DELETE_SECS);
--- a/src/lib-storage/list/mailbox-list-index.c	Sun Sep 16 16:08:18 2012 +0300
+++ b/src/lib-storage/list/mailbox-list-index.c	Sun Sep 16 16:12:03 2012 +0300
@@ -408,7 +408,7 @@
 		counter = ioloop_time;
 	else {
 		memcpy(&counter, data, size);
-		if (++counter < ioloop_time)
+		if (++counter < (uint32_t)ioloop_time)
 			counter = ioloop_time;
 	}
 
--- a/src/lib/json-parser.c	Sun Sep 16 16:08:18 2012 +0300
+++ b/src/lib/json-parser.c	Sun Sep 16 16:12:03 2012 +0300
@@ -185,7 +185,7 @@
 {
 	unsigned int len = strlen(atom);
 
-	if (parser->end - parser->data < len)
+	if ((size_t)(parser->end - parser->data) < len)
 		return -1;
 	if (memcmp(parser->data, atom, len) != 0)
 		return -1;