dovecot-2.2: Compiler warning fixes for 32bit systems.
dovecot at dovecot.org
dovecot at dovecot.org
Sun Sep 16 16:12:11 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/e708a1d691d3
changeset: 15080:e708a1d691d3
user: Timo Sirainen <tss at iki.fi>
date: Sun Sep 16 16:12:03 2012 +0300
description:
Compiler warning fixes for 32bit systems.
diffstat:
src/director/user-directory.c | 6 +++---
src/doveadm/dsync/dsync-mailbox-tree-sync.c | 4 ++--
src/lib-storage/index/dbox-common/dbox-storage.c | 2 +-
src/lib-storage/index/dbox-multi/mdbox-map.c | 2 +-
src/lib-storage/index/maildir/maildir-storage.c | 2 +-
src/lib-storage/list/mailbox-list-index.c | 2 +-
src/lib/json-parser.c | 2 +-
7 files changed, 10 insertions(+), 10 deletions(-)
diffs (111 lines):
diff -r 925d4a890a9b -r e708a1d691d3 src/director/user-directory.c
--- 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 {
diff -r 925d4a890a9b -r e708a1d691d3 src/doveadm/dsync/dsync-mailbox-tree-sync.c
--- 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);
diff -r 925d4a890a9b -r e708a1d691d3 src/lib-storage/index/dbox-common/dbox-storage.c
--- 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);
diff -r 925d4a890a9b -r e708a1d691d3 src/lib-storage/index/dbox-multi/mdbox-map.c
--- 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);
diff -r 925d4a890a9b -r e708a1d691d3 src/lib-storage/index/maildir/maildir-storage.c
--- 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);
diff -r 925d4a890a9b -r e708a1d691d3 src/lib-storage/list/mailbox-list-index.c
--- 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;
}
diff -r 925d4a890a9b -r e708a1d691d3 src/lib/json-parser.c
--- 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;
More information about the dovecot-cvs
mailing list