1 Return-Path: <jani@nikula.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 E417F40F435
\r
6 for <notmuch@notmuchmail.org>; Sat, 7 Jan 2012 15:27:06 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
13 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id w08BctvfQAaw for <notmuch@notmuchmail.org>;
\r
17 Sat, 7 Jan 2012 15:27:05 -0800 (PST)
\r
18 Received: from mail-ey0-f181.google.com (mail-ey0-f181.google.com
\r
19 [209.85.215.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 11DB1429E47
\r
22 for <notmuch@notmuchmail.org>; Sat, 7 Jan 2012 15:26:53 -0800 (PST)
\r
23 Received: by mail-ey0-f181.google.com with SMTP id i1so1939016eaa.26
\r
24 for <notmuch@notmuchmail.org>; Sat, 07 Jan 2012 15:26:53 -0800 (PST)
\r
25 Received: by 10.213.2.145 with SMTP id 17mr2152223ebj.104.1325978813656;
\r
26 Sat, 07 Jan 2012 15:26:53 -0800 (PST)
\r
27 Received: from localhost (dsl-hkibrasgw4-fe5cdc00-23.dhcp.inet.fi.
\r
29 by mx.google.com with ESMTPS id t1sm268656702eeb.3.2012.01.07.15.26.51
\r
30 (version=SSLv3 cipher=OTHER); Sat, 07 Jan 2012 15:26:52 -0800 (PST)
\r
31 From: Jani Nikula <jani@nikula.org>
\r
32 To: notmuch@notmuchmail.org
\r
33 Subject: [RFC PATCH 8/9] lib: use -std=c++0x -pedantic
\r
34 Date: Sun, 8 Jan 2012 01:26:22 +0200
\r
36 <a691df05f0b4bd759e5df50cc959a58a2cc8ce44.1325977940.git.jani@nikula.org>
\r
37 X-Mailer: git-send-email 1.7.5.4
\r
38 In-Reply-To: <cover.1325977940.git.jani@nikula.org>
\r
39 References: <cover.1325977940.git.jani@nikula.org>
\r
40 In-Reply-To: <cover.1325977940.git.jani@nikula.org>
\r
41 References: <cover.1325977940.git.jani@nikula.org>
\r
42 X-BeenThere: notmuch@notmuchmail.org
\r
43 X-Mailman-Version: 2.1.13
\r
45 List-Id: "Use and development of the notmuch mail system."
\r
46 <notmuch.notmuchmail.org>
\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
50 List-Post: <mailto:notmuch@notmuchmail.org>
\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
53 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
54 X-List-Received-Date: Sat, 07 Jan 2012 23:27:07 -0000
\r
56 Introduces warnings such as:
\r
58 In file included from /usr/include/gmime-2.4/gmime/gmime.h:39:0,
\r
59 from lib/database.cc:31:
\r
60 /usr/include/gmime-2.4/gmime/gmime-message.h:57:26: warning: comma at end of enumerator list [-pedantic]
\r
62 Signed-off-by: Jani Nikula <jani@nikula.org>
\r
65 lib/database.cc | 3 +--
\r
66 lib/message.cc | 2 +-
\r
67 lib/notmuch-private.h | 8 +++++---
\r
68 lib/thread.cc | 2 +-
\r
69 5 files changed, 9 insertions(+), 8 deletions(-)
\r
71 diff --git a/configure b/configure
\r
72 index f84262d..30831f3 100755
\r
75 @@ -26,7 +26,7 @@ fi
\r
78 CFLAGS=${CFLAGS:--O2 -std=c99 -pedantic}
\r
79 -CXXFLAGS=${CXXFLAGS:--O2}
\r
80 +CXXFLAGS=${CXXFLAGS:--O2 -std=c++0x -pedantic}
\r
81 LDFLAGS=${LDFLAGS:-}
\r
82 XAPIAN_CONFIG=${XAPIAN_CONFIG:-xapian-config}
\r
84 diff --git a/lib/database.cc b/lib/database.cc
\r
85 index 8103bd9..b59497b 100644
\r
86 --- a/lib/database.cc
\r
87 +++ b/lib/database.cc
\r
88 @@ -1352,8 +1352,7 @@ _resolve_message_id_to_thread_id (notmuch_database_t *notmuch,
\r
92 - *thread_id_ret = talloc_steal (ctx,
\r
93 - notmuch_message_get_thread_id (message));
\r
94 + *thread_id_ret = (const char *) _talloc_steal_loc (ctx, notmuch_message_get_thread_id (message), __location__);
\r
96 notmuch_message_destroy (message);
\r
98 diff --git a/lib/message.cc b/lib/message.cc
\r
99 index 0075425..ed7398a 100644
\r
100 --- a/lib/message.cc
\r
101 +++ b/lib/message.cc
\r
102 @@ -220,7 +220,7 @@ _notmuch_message_create_for_message_id (notmuch_database_t *notmuch,
\r
106 - return talloc_steal (notmuch, message);
\r
107 + return (notmuch_message_t *) _talloc_steal_loc (notmuch, message, __location__);
\r
108 else if (*status_ret)
\r
111 diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h
\r
112 index 60a932f..7694705 100644
\r
113 --- a/lib/notmuch-private.h
\r
114 +++ b/lib/notmuch-private.h
\r
115 @@ -137,15 +137,17 @@ typedef enum _notmuch_private_status {
\r
116 * that the caller has previously handled any expected
\r
117 * notmuch_private_status_t values.)
\r
119 -#define COERCE_STATUS(private_status, format, ...) \
\r
120 +#define _COERCE_STATUS(private_status, format, ...) \
\r
121 ((private_status >= (notmuch_private_status_t) NOTMUCH_STATUS_LAST_STATUS)\
\r
123 - (notmuch_status_t) _internal_error (format " (%s).\n", \
\r
125 + (notmuch_status_t) _internal_error (format "%s (%s).\n", \
\r
129 (notmuch_status_t) private_status)
\r
131 +#define COERCE_STATUS(private_status, ...) _COERCE_STATUS(private_status, __VA_ARGS__, "")
\r
133 typedef struct _notmuch_doc_id_set notmuch_doc_id_set_t;
\r
136 diff --git a/lib/thread.cc b/lib/thread.cc
\r
137 index 0435ee6..e8f169c 100644
\r
138 --- a/lib/thread.cc
\r
139 +++ b/lib/thread.cc
\r
140 @@ -224,7 +224,7 @@ _thread_add_message (notmuch_thread_t *thread,
\r
141 char *clean_author;
\r
143 _notmuch_message_list_add_message (thread->message_list,
\r
144 - talloc_steal (thread, message));
\r
145 + (notmuch_message_t *) _talloc_steal_loc (thread, message, __location__));
\r
146 thread->total_messages++;
\r
148 g_hash_table_insert (thread->message_hash,
\r