Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E417F40F435 for ; Sat, 7 Jan 2012 15:27:06 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w08BctvfQAaw for ; Sat, 7 Jan 2012 15:27:05 -0800 (PST) Received: from mail-ey0-f181.google.com (mail-ey0-f181.google.com [209.85.215.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 11DB1429E47 for ; Sat, 7 Jan 2012 15:26:53 -0800 (PST) Received: by mail-ey0-f181.google.com with SMTP id i1so1939016eaa.26 for ; Sat, 07 Jan 2012 15:26:53 -0800 (PST) Received: by 10.213.2.145 with SMTP id 17mr2152223ebj.104.1325978813656; Sat, 07 Jan 2012 15:26:53 -0800 (PST) Received: from localhost (dsl-hkibrasgw4-fe5cdc00-23.dhcp.inet.fi. [80.220.92.23]) by mx.google.com with ESMTPS id t1sm268656702eeb.3.2012.01.07.15.26.51 (version=SSLv3 cipher=OTHER); Sat, 07 Jan 2012 15:26:52 -0800 (PST) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [RFC PATCH 8/9] lib: use -std=c++0x -pedantic Date: Sun, 8 Jan 2012 01:26:22 +0200 Message-Id: X-Mailer: git-send-email 1.7.5.4 In-Reply-To: References: In-Reply-To: References: X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2012 23:27:07 -0000 Introduces warnings such as: In file included from /usr/include/gmime-2.4/gmime/gmime.h:39:0, from lib/database.cc:31: /usr/include/gmime-2.4/gmime/gmime-message.h:57:26: warning: comma at end of enumerator list [-pedantic] Signed-off-by: Jani Nikula --- configure | 2 +- lib/database.cc | 3 +-- lib/message.cc | 2 +- lib/notmuch-private.h | 8 +++++--- lib/thread.cc | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/configure b/configure index f84262d..30831f3 100755 --- a/configure +++ b/configure @@ -26,7 +26,7 @@ fi CC=${CC:-gcc} CXX=${CXX:-g++} CFLAGS=${CFLAGS:--O2 -std=c99 -pedantic} -CXXFLAGS=${CXXFLAGS:--O2} +CXXFLAGS=${CXXFLAGS:--O2 -std=c++0x -pedantic} LDFLAGS=${LDFLAGS:-} XAPIAN_CONFIG=${XAPIAN_CONFIG:-xapian-config} diff --git a/lib/database.cc b/lib/database.cc index 8103bd9..b59497b 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -1352,8 +1352,7 @@ _resolve_message_id_to_thread_id (notmuch_database_t *notmuch, return status; if (message) { - *thread_id_ret = talloc_steal (ctx, - notmuch_message_get_thread_id (message)); + *thread_id_ret = (const char *) _talloc_steal_loc (ctx, notmuch_message_get_thread_id (message), __location__); notmuch_message_destroy (message); diff --git a/lib/message.cc b/lib/message.cc index 0075425..ed7398a 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -220,7 +220,7 @@ _notmuch_message_create_for_message_id (notmuch_database_t *notmuch, message_id, &message); if (message) - return talloc_steal (notmuch, message); + return (notmuch_message_t *) _talloc_steal_loc (notmuch, message, __location__); else if (*status_ret) return NULL; diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h index 60a932f..7694705 100644 --- a/lib/notmuch-private.h +++ b/lib/notmuch-private.h @@ -137,15 +137,17 @@ typedef enum _notmuch_private_status { * that the caller has previously handled any expected * notmuch_private_status_t values.) */ -#define COERCE_STATUS(private_status, format, ...) \ +#define _COERCE_STATUS(private_status, format, ...) \ ((private_status >= (notmuch_private_status_t) NOTMUCH_STATUS_LAST_STATUS)\ ? \ - (notmuch_status_t) _internal_error (format " (%s).\n", \ - ##__VA_ARGS__, \ + (notmuch_status_t) _internal_error (format "%s (%s).\n", \ + __VA_ARGS__, \ __location__) \ : \ (notmuch_status_t) private_status) +#define COERCE_STATUS(private_status, ...) _COERCE_STATUS(private_status, __VA_ARGS__, "") + typedef struct _notmuch_doc_id_set notmuch_doc_id_set_t; /* database.cc */ diff --git a/lib/thread.cc b/lib/thread.cc index 0435ee6..e8f169c 100644 --- a/lib/thread.cc +++ b/lib/thread.cc @@ -224,7 +224,7 @@ _thread_add_message (notmuch_thread_t *thread, char *clean_author; _notmuch_message_list_add_message (thread->message_list, - talloc_steal (thread, message)); + (notmuch_message_t *) _talloc_steal_loc (thread, message, __location__)); thread->total_messages++; g_hash_table_insert (thread->message_hash, -- 1.7.5.4