Re: [PATCH 0/4] Versatile date/time parser
[notmuch-archives.git] / 8d / cbab061b11f91dbb6b92e6fbada63e43c23f9a
1 Return-Path: <djcb@djcbsoftware.nl>\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 7C161431FBC\r
6         for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 07:11:07 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 Received: from olra.theworths.org ([127.0.0.1])\r
9         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
10         with ESMTP id VZE9TAiIO2GY for <notmuch@notmuchmail.org>;\r
11         Sun, 22 Nov 2009 07:11:06 -0800 (PST)\r
12 Received: from gw03.mail.saunalahti.fi (gw03.mail.saunalahti.fi\r
13         [195.197.172.111])\r
14         by olra.theworths.org (Postfix) with ESMTP id 6887A431FAE\r
15         for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 07:11:06 -0800 (PST)\r
16 Received: from djcbsoftware.nl (a88-112-254-208.elisa-laajakaista.fi\r
17         [88.112.254.208])\r
18         (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by gw03.mail.saunalahti.fi (Postfix) with ESMTP id BAB93216618\r
21         for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 17:11:03 +0200 (EET)\r
22 Received: from cthulhu.mindcrime.djcbsoftware.nl (localhost [127.0.0.1])\r
23         by djcbsoftware.nl (Postfix) with ESMTP id 3572F456001\r
24         for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 17:11:03 +0200 (EET)\r
25 Date: Sun, 22 Nov 2009 17:11:03 +0200\r
26 Message-ID: <87d43ay4qg.wl%djcb@djcbsoftware.nl>\r
27 From: Dirk-Jan C. Binnema <djcb.bulk@gmail.com>\r
28 To: "notmuch@notmuchmail org" <notmuch@notmuchmail.org>\r
29 Mail-Reply-To: djcb@djcbsoftware.nl\r
30 User-Agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/23.1 Mule/6.0\r
31         (HANACHIRUSATO)\r
32 Organization: DJCBSoftware\r
33 MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka")\r
34 Content-Type: text/plain; charset=US-ASCII\r
35 Subject: [notmuch] [PATCH] fix compiler warnings\r
36 X-BeenThere: notmuch@notmuchmail.org\r
37 X-Mailman-Version: 2.1.12\r
38 Precedence: list\r
39 Reply-To: djcb@djcbsoftware.nl\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Sun, 22 Nov 2009 15:11:07 -0000\r
50 \r
51 \r
52 (hopefully this is the correct way to send patches...)\r
53 \r
54 With these minor changes, notmuch compiles warning-free with gcc 4.4.1\r
55 \r
56 ---\r
57  notmuch-new.c   |    4 +++-\r
58  notmuch-setup.c |   13 +++++++------\r
59  notmuch-tag.c   |    4 +++-\r
60  3 files changed, 13 insertions(+), 8 deletions(-)\r
61 \r
62 diff --git a/notmuch-new.c b/notmuch-new.c\r
63 index 0dd2784..88b48a6 100644\r
64 --- a/notmuch-new.c\r
65 +++ b/notmuch-new.c\r
66 @@ -36,7 +36,9 @@ static void\r
67  handle_sigint (unused (int sig))\r
68  {\r
69      static char msg[] = "Stopping...         \n";\r
70 -    write(2, msg, sizeof(msg)-1);\r
71 +    if (write(2, msg, sizeof(msg)-1) < 0) {\r
72 +           /* ignore...*/\r
73 +    }\r
74      interrupted = 1;\r
75  }\r
76  \r
77 diff --git a/notmuch-setup.c b/notmuch-setup.c\r
78 index 482efd2..0d3f186 100644\r
79 --- a/notmuch-setup.c\r
80 +++ b/notmuch-setup.c\r
81 @@ -99,12 +99,13 @@ notmuch_setup_command (unused (void *ctx),\r
82      unsigned int i;\r
83      int is_new;\r
84  \r
85 -#define prompt(format, ...)                            \\r
86 -    do {                                               \\r
87 -       printf (format, ##__VA_ARGS__);                 \\r
88 -       fflush (stdout);                                \\r
89 -       getline (&response, &response_size, stdin);     \\r
90 -       chomp_newline (response);                       \\r
91 +#define prompt(format, ...)                                    \\r
92 +    do {                                                       \\r
93 +       printf (format, ##__VA_ARGS__);                         \\r
94 +       fflush (stdout);                                        \\r
95 +       if (getline (&response, &response_size, stdin) < 0)     \\r
96 +               break;                                          \\r
97 +       chomp_newline (response);                               \\r
98      } while (0)\r
99  \r
100      config = notmuch_config_open (ctx, NULL, &is_new);\r
101 diff --git a/notmuch-tag.c b/notmuch-tag.c\r
102 index e2311f6..5e40f50 100644\r
103 --- a/notmuch-tag.c\r
104 +++ b/notmuch-tag.c\r
105 @@ -26,7 +26,9 @@ static void\r
106  handle_sigint (unused (int sig))\r
107  {\r
108      static char msg[] = "Stopping...         \n";\r
109 -    write(2, msg, sizeof(msg)-1);\r
110 +    if (write(2, msg, sizeof(msg)-1) < 0) {\r
111 +           /* ignore... */\r
112 +    }\r
113      interrupted = 1;\r
114  }\r
115  \r
116 -- \r
117 1.6.3.3\r
118 \r