changeset 18629:9c4d1e1e252f

Compiler warning fixes
author Timo Sirainen <tss@iki.fi>
date Mon, 11 May 2015 12:28:58 +0300
parents 413962f2b7e7
children 13461d146be0
files src/imap-urlauth/imap-urlauth.c src/plugins/fts-lucene/lucene-wrapper.cc src/pop3/main.c
diffstat 3 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- 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;
 
--- 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);