dovecot-2.2: Compiler warning fixes

dovecot at dovecot.org dovecot at dovecot.org
Mon May 11 09:31:07 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/9c4d1e1e252f
changeset: 18629:9c4d1e1e252f
user:      Timo Sirainen <tss at iki.fi>
date:      Mon May 11 12:28:58 2015 +0300
description:
Compiler warning fixes

diffstat:

 src/imap-urlauth/imap-urlauth.c          |  8 ++++++--
 src/plugins/fts-lucene/lucene-wrapper.cc |  5 ++---
 src/pop3/main.c                          |  4 +++-
 3 files changed, 11 insertions(+), 6 deletions(-)

diffs (76 lines):

diff -r 413962f2b7e7 -r 9c4d1e1e252f src/imap-urlauth/imap-urlauth.c
--- a/src/imap-urlauth/imap-urlauth.c	Mon May 11 12:27:39 2015 +0300
+++ b/src/imap-urlauth/imap-urlauth.c	Mon May 11 12:28:58 2015 +0300
@@ -143,7 +143,9 @@
 		i_error("Peer's credentials (uid=%ld) do not match "
 			"the user that logged in (uid=%ld).",
 			(long)cred.uid, (long)reply.uid);
-		(void)write(client->fd, msg, strlen(msg));
+		if (write(client->fd, msg, strlen(msg)) < 0) {
+			/* ignored */
+		}
 		net_disconnect(client->fd);
 		return;
 	}
@@ -159,7 +161,9 @@
 				const char *errormsg ATTR_UNUSED)
 {
 	const char *msg = "NO\n";
-	(void)write(client->fd, msg, strlen(msg));
+	if (write(client->fd, msg, strlen(msg)) < 0) {
+		/* ignored */
+	}
 }
 
 static void client_connected(struct master_service_connection *conn)
diff -r 413962f2b7e7 -r 9c4d1e1e252f src/plugins/fts-lucene/lucene-wrapper.cc
--- a/src/plugins/fts-lucene/lucene-wrapper.cc	Mon May 11 12:27:39 2015 +0300
+++ b/src/plugins/fts-lucene/lucene-wrapper.cc	Mon May 11 12:28:58 2015 +0300
@@ -99,7 +99,9 @@
 };
 
 static void *textcat = NULL;
+#ifdef HAVE_FTS_TEXTCAT
 static bool textcat_broken = FALSE;
+#endif
 static int textcat_refcount = 0;
 
 static void lucene_handle_error(struct lucene_index *index, CLuceneError &err,
@@ -112,7 +114,6 @@
 				       const struct fts_lucene_settings *set)
 {
 	struct lucene_index *index;
-	unsigned int len;
 
 	index = i_new(struct lucene_index, 1);
 	index->path = i_strdup(path);
@@ -410,7 +411,6 @@
 
 static int lucene_settings_check(struct lucene_index *index)
 {
-	struct fts_index_header hdr;
 	uint32_t set_checksum;
 	int ret = 0;
 
@@ -858,7 +858,6 @@
 {
 	static const TCHAR *sort_fields[] = { _T("box"), _T("uid"), NULL };
 	struct rescan_context ctx;
-	guid_128_t guid;
 	bool failed = false;
 	int ret;
 
diff -r 413962f2b7e7 -r 9c4d1e1e252f src/pop3/main.c
--- a/src/pop3/main.c	Mon May 11 12:27:39 2015 +0300
+++ b/src/pop3/main.c	Mon May 11 12:28:58 2015 +0300
@@ -107,7 +107,9 @@
 
 	if (mail_storage_service_lookup_next(storage_service, input,
 					     &user, &mail_user, error_r) <= 0) {
-		(void)write(fd_out, lookup_error_str, strlen(lookup_error_str));
+		if (write(fd_out, lookup_error_str, strlen(lookup_error_str)) < 0) {
+			/* ignored */
+		}
 		return -1;
 	}
 	restrict_access_allow_coredumps(TRUE);


More information about the dovecot-cvs mailing list