dovecot-2.0: Compiler warning fixes.

dovecot at dovecot.org dovecot at dovecot.org
Wed May 19 18:07:58 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/d6d59ff58511
changeset: 11334:d6d59ff58511
user:      Timo Sirainen <tss at iki.fi>
date:      Wed May 19 17:07:46 2010 +0200
description:
Compiler warning fixes.

diffstat:

 src/director/director-connection.c   |  2 +-
 src/director/user-directory.c        |  7 ++++---
 src/login-common/login-proxy-state.c |  2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

diffs (48 lines):

diff -r 16fbdcbb6dcb -r d6d59ff58511 src/director/director-connection.c
--- a/src/director/director-connection.c	Wed May 19 16:19:56 2010 +0200
+++ b/src/director/director-connection.c	Wed May 19 17:07:46 2010 +0200
@@ -162,7 +162,7 @@
 					     host, timestamp);
 		return TRUE;
 	}
-	if (timestamp == ioloop_time && user->timestamp != timestamp) {
+	if (timestamp == ioloop_time && (time_t)user->timestamp != timestamp) {
 		user_directory_refresh(dir->users, user);
 		ret = TRUE;
 	}
diff -r 16fbdcbb6dcb -r d6d59ff58511 src/director/user-directory.c
--- a/src/director/user-directory.c	Wed May 19 16:19:56 2010 +0200
+++ b/src/director/user-directory.c	Wed May 19 17:07:46 2010 +0200
@@ -52,7 +52,7 @@
 static void user_directory_drop_expired(struct user_directory *dir)
 {
 	while (dir->head != NULL &&
-	       ioloop_time > dir->head->timestamp + dir->timeout_secs)
+	       ioloop_time > (time_t)(dir->head->timestamp + dir->timeout_secs))
 		user_free(dir, dir->head);
 }
 
@@ -117,8 +117,9 @@
 bool user_directory_user_has_connections(struct user_directory *dir,
 					 struct user *user)
 {
-	return user->timestamp +
-		dir->timeout_secs - MAX_CLOCK_DRIFT_SECS >= ioloop_time;
+	time_t expire_timestamp = user->timestamp + dir->timeout_secs;
+
+	return expire_timestamp - MAX_CLOCK_DRIFT_SECS >= ioloop_time;
 }
 
 struct user_directory *user_directory_init(unsigned int timeout_secs)
diff -r 16fbdcbb6dcb -r d6d59ff58511 src/login-common/login-proxy-state.c
--- a/src/login-common/login-proxy-state.c	Wed May 19 16:19:56 2010 +0200
+++ b/src/login-common/login-proxy-state.c	Wed May 19 17:07:46 2010 +0200
@@ -118,7 +118,7 @@
 		ret = write(state->notify_fd, cmd, len);
 	} T_END;
 
-	if (ret != len) {
+	if (ret != (ssize_t)len) {
 		if (ret < 0)
 			i_error("write(%s) failed: %m", state->notify_path);
 		else {


More information about the dovecot-cvs mailing list