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 13B65429E3B for ; Sat, 7 Jan 2012 15:26:31 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 vT5rwtd3dkAF for ; Sat, 7 Jan 2012 15:26:30 -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 425DA429E29 for ; Sat, 7 Jan 2012 15:26:30 -0800 (PST) Received: by eaai1 with SMTP id i1so1939016eaa.26 for ; Sat, 07 Jan 2012 15:26:27 -0800 (PST) Received: by 10.213.25.71 with SMTP id y7mr414327ebb.95.1325978787424; Sat, 07 Jan 2012 15:26:27 -0800 (PST) Received: from localhost (dsl-hkibrasgw4-fe5cdc00-23.dhcp.inet.fi. [80.220.92.23]) by mx.google.com with ESMTPS id 15sm17755970eeu.1.2012.01.07.15.26.25 (version=SSLv3 cipher=OTHER); Sat, 07 Jan 2012 15:26:26 -0800 (PST) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [RFC PATCH 0/9] -std=c99 / -std=c++0x -pedantic Date: Sun, 8 Jan 2012 01:26:14 +0200 Message-Id: X-Mailer: git-send-email 1.7.5.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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:26:31 -0000 Hi all, this series was borne of curiousity about compiling the notmuch codebase using -std=c99 / -std=c++0x -pedantic options. The C part is split into separate patches to make it easier to see each warning and fix; with C++ I didn't bother so much. Turns out there are a few specific issues, but overall it's not too bad. However my gut feeling is that some of the fixes to get standards compliance are uglier than just using the GCC extensions. The question is, do we care about anything other than GCC? Comments and discussion welcome; that was the whole point here rather than any serious effort for merging these. (But that can follow if people think this is worth it.) BR, Jani. Jani Nikula (9): build: use -std=c99 -pedantic for C source xutil: #define _POSIX_C_SOURCE to get strdup() lib: fix messages.c build warn lib: HACK: avoid warnings from talloc_steal() cli: fix warning about variadic macros cli: fix another warning about variadic macros util: fix warning about variadic macros lib: use -std=c++0x -pedantic test: smtp-dummy: fixes for -std=c99 -pedantic configure | 4 ++-- lib/database.cc | 3 +-- lib/message.cc | 2 +- lib/messages.c | 6 ++++-- lib/notmuch-private.h | 8 +++++--- lib/tags.c | 5 ++++- lib/thread.cc | 2 +- notmuch-client.h | 9 ++++++--- notmuch-setup.c | 7 +++++-- test/smtp-dummy.c | 4 +++- util/error_util.h | 8 +++++--- util/xutil.c | 2 ++ 12 files changed, 39 insertions(+), 21 deletions(-) -- 1.7.5.4