[PATCH] notmuch: Quiet buildbot warnings.
authorDavid Edmondson <dme@dme.org>
Tue, 20 Dec 2011 15:20:04 +0000 (15:20 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:41:06 +0000 (09:41 -0800)
8b/1ebfeb24510547c6a2331a8aa998a30d2718bb [new file with mode: 0644]

diff --git a/8b/1ebfeb24510547c6a2331a8aa998a30d2718bb b/8b/1ebfeb24510547c6a2331a8aa998a30d2718bb
new file mode 100644 (file)
index 0000000..f5c32d0
--- /dev/null
@@ -0,0 +1,120 @@
+Return-Path: <dme@dme.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id BB606431FD0\r
+       for <notmuch@notmuchmail.org>; Tue, 20 Dec 2011 07:20:10 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id M-uDnOqOafFa for <notmuch@notmuchmail.org>;\r
+       Tue, 20 Dec 2011 07:20:10 -0800 (PST)\r
+Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com\r
+       [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 2EF98431FB6\r
+       for <notmuch@notmuchmail.org>; Tue, 20 Dec 2011 07:20:10 -0800 (PST)\r
+Received: by wibhq2 with SMTP id hq2so1985288wib.26\r
+       for <notmuch@notmuchmail.org>; Tue, 20 Dec 2011 07:20:09 -0800 (PST)\r
+Received: by 10.180.79.35 with SMTP id g3mr5574031wix.19.1324394409001;\r
+       Tue, 20 Dec 2011 07:20:09 -0800 (PST)\r
+Received: from hotblack-desiato.hh.sledj.net\r
+       (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25])\r
+       by mx.google.com with ESMTPS id et20sm2324307wbb.15.2011.12.20.07.20.07\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Tue, 20 Dec 2011 07:20:08 -0800 (PST)\r
+Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)\r
+       id 2E580A024F; Tue, 20 Dec 2011 15:20:06 +0000 (GMT)\r
+From: David Edmondson <dme@dme.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] notmuch: Quiet buildbot warnings.\r
+Date: Tue, 20 Dec 2011 15:20:04 +0000\r
+Message-Id: <1324394404-2574-1-git-send-email-dme@dme.org>\r
+X-Mailer: git-send-email 1.7.7.3\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 20 Dec 2011 15:20:10 -0000\r
+\r
+Cast away the result of various *write functions. Provide a default\r
+value for some variables to avoid "use before set" warnings.\r
+---\r
+\r
+The buildbot complains about these, though my own system (Debian\r
+testing on amd64) does not.\r
+\r
+ lib/database.cc |    2 +-\r
+ notmuch-new.c   |    2 +-\r
+ notmuch-show.c  |    2 +-\r
+ notmuch-tag.c   |    2 +-\r
+ 4 files changed, 4 insertions(+), 4 deletions(-)\r
+\r
+diff --git a/lib/database.cc b/lib/database.cc\r
+index 98f101e..f1a9dc2 100644\r
+--- a/lib/database.cc\r
++++ b/lib/database.cc\r
+@@ -1447,7 +1447,7 @@ _notmuch_database_link_message_to_parents (notmuch_database_t *notmuch,\r
+     keys = g_hash_table_get_keys (parents);\r
+     for (l = keys; l; l = l->next) {\r
+       char *parent_message_id;\r
+-      const char *parent_thread_id;\r
++      const char *parent_thread_id = NULL;\r
\r
+       parent_message_id = (char *) l->data;\r
\r
+diff --git a/notmuch-new.c b/notmuch-new.c\r
+index bfb4600..3512de7 100644\r
+--- a/notmuch-new.c\r
++++ b/notmuch-new.c\r
+@@ -67,7 +67,7 @@ handle_sigint (unused (int sig))\r
+ {\r
+     static char msg[] = "Stopping...         \n";\r
\r
+-    write(2, msg, sizeof(msg)-1);\r
++    (void) write(2, msg, sizeof(msg)-1);\r
+     interrupted = 1;\r
+ }\r
\r
+diff --git a/notmuch-show.c b/notmuch-show.c\r
+index 8da3295..19fb49f 100644\r
+--- a/notmuch-show.c\r
++++ b/notmuch-show.c\r
+@@ -866,7 +866,7 @@ do_show_single (void *ctx,\r
\r
+       while (!feof (file)) {\r
+           size = fread (buf, 1, sizeof (buf), file);\r
+-          fwrite (buf, size, 1, stdout);\r
++          (void) fwrite (buf, size, 1, stdout);\r
+       }\r
\r
+       fclose (file);\r
+diff --git a/notmuch-tag.c b/notmuch-tag.c\r
+index 537d5a4..292c5da 100644\r
+--- a/notmuch-tag.c\r
++++ b/notmuch-tag.c\r
+@@ -26,7 +26,7 @@ static void\r
+ handle_sigint (unused (int sig))\r
+ {\r
+     static char msg[] = "Stopping...         \n";\r
+-    write(2, msg, sizeof(msg)-1);\r
++    (void) write(2, msg, sizeof(msg)-1);\r
+     interrupted = 1;\r
+ }\r
\r
+-- \r
+1.7.7.3\r
+\r