Re: Hi all
[notmuch-archives.git] / 8b / 1ebfeb24510547c6a2331a8aa998a30d2718bb
1 Return-Path: <dme@dme.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id BB606431FD0\r
6         for <notmuch@notmuchmail.org>; Tue, 20 Dec 2011 07:20:10 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id M-uDnOqOafFa for <notmuch@notmuchmail.org>;\r
16         Tue, 20 Dec 2011 07:20:10 -0800 (PST)\r
17 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com\r
18         [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 2EF98431FB6\r
21         for <notmuch@notmuchmail.org>; Tue, 20 Dec 2011 07:20:10 -0800 (PST)\r
22 Received: by wibhq2 with SMTP id hq2so1985288wib.26\r
23         for <notmuch@notmuchmail.org>; Tue, 20 Dec 2011 07:20:09 -0800 (PST)\r
24 Received: by 10.180.79.35 with SMTP id g3mr5574031wix.19.1324394409001;\r
25         Tue, 20 Dec 2011 07:20:09 -0800 (PST)\r
26 Received: from hotblack-desiato.hh.sledj.net\r
27         (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25])\r
28         by mx.google.com with ESMTPS id et20sm2324307wbb.15.2011.12.20.07.20.07\r
29         (version=TLSv1/SSLv3 cipher=OTHER);\r
30         Tue, 20 Dec 2011 07:20:08 -0800 (PST)\r
31 Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)\r
32         id 2E580A024F; Tue, 20 Dec 2011 15:20:06 +0000 (GMT)\r
33 From: David Edmondson <dme@dme.org>\r
34 To: notmuch@notmuchmail.org\r
35 Subject: [PATCH] notmuch: Quiet buildbot warnings.\r
36 Date: Tue, 20 Dec 2011 15:20:04 +0000\r
37 Message-Id: <1324394404-2574-1-git-send-email-dme@dme.org>\r
38 X-Mailer: git-send-email 1.7.7.3\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Tue, 20 Dec 2011 15:20:10 -0000\r
52 \r
53 Cast away the result of various *write functions. Provide a default\r
54 value for some variables to avoid "use before set" warnings.\r
55 ---\r
56 \r
57 The buildbot complains about these, though my own system (Debian\r
58 testing on amd64) does not.\r
59 \r
60  lib/database.cc |    2 +-\r
61  notmuch-new.c   |    2 +-\r
62  notmuch-show.c  |    2 +-\r
63  notmuch-tag.c   |    2 +-\r
64  4 files changed, 4 insertions(+), 4 deletions(-)\r
65 \r
66 diff --git a/lib/database.cc b/lib/database.cc\r
67 index 98f101e..f1a9dc2 100644\r
68 --- a/lib/database.cc\r
69 +++ b/lib/database.cc\r
70 @@ -1447,7 +1447,7 @@ _notmuch_database_link_message_to_parents (notmuch_database_t *notmuch,\r
71      keys = g_hash_table_get_keys (parents);\r
72      for (l = keys; l; l = l->next) {\r
73         char *parent_message_id;\r
74 -       const char *parent_thread_id;\r
75 +       const char *parent_thread_id = NULL;\r
76  \r
77         parent_message_id = (char *) l->data;\r
78  \r
79 diff --git a/notmuch-new.c b/notmuch-new.c\r
80 index bfb4600..3512de7 100644\r
81 --- a/notmuch-new.c\r
82 +++ b/notmuch-new.c\r
83 @@ -67,7 +67,7 @@ handle_sigint (unused (int sig))\r
84  {\r
85      static char msg[] = "Stopping...         \n";\r
86  \r
87 -    write(2, msg, sizeof(msg)-1);\r
88 +    (void) write(2, msg, sizeof(msg)-1);\r
89      interrupted = 1;\r
90  }\r
91  \r
92 diff --git a/notmuch-show.c b/notmuch-show.c\r
93 index 8da3295..19fb49f 100644\r
94 --- a/notmuch-show.c\r
95 +++ b/notmuch-show.c\r
96 @@ -866,7 +866,7 @@ do_show_single (void *ctx,\r
97  \r
98         while (!feof (file)) {\r
99             size = fread (buf, 1, sizeof (buf), file);\r
100 -           fwrite (buf, size, 1, stdout);\r
101 +           (void) fwrite (buf, size, 1, stdout);\r
102         }\r
103  \r
104         fclose (file);\r
105 diff --git a/notmuch-tag.c b/notmuch-tag.c\r
106 index 537d5a4..292c5da 100644\r
107 --- a/notmuch-tag.c\r
108 +++ b/notmuch-tag.c\r
109 @@ -26,7 +26,7 @@ static void\r
110  handle_sigint (unused (int sig))\r
111  {\r
112      static char msg[] = "Stopping...         \n";\r
113 -    write(2, msg, sizeof(msg)-1);\r
114 +    (void) write(2, msg, sizeof(msg)-1);\r
115      interrupted = 1;\r
116  }\r
117  \r
118 -- \r
119 1.7.7.3\r
120 \r