From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id BAA9840F424 for ; Sat, 7 Jan 2012 15:27:00 -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 bRA98CU7wmlf for ; Sat, 7 Jan 2012 15:26:59 -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 3D33D40A289 for ; Sat, 7 Jan 2012 15:26:47 -0800 (PST) Received: by mail-ey0-f181.google.com with SMTP id i1so1939016eaa.26 for ; Sat, 07 Jan 2012 15:26:47 -0800 (PST) Received: by 10.213.13.220 with SMTP id d28mr2184660eba.98.1325978806855; Sat, 07 Jan 2012 15:26:46 -0800 (PST) Received: from localhost (dsl-hkibrasgw4-fe5cdc00-23.dhcp.inet.fi. [80.220.92.23]) by mx.google.com with ESMTPS id y12sm267562206eeb.11.2012.01.07.15.26.45 (version=SSLv3 cipher=OTHER); Sat, 07 Jan 2012 15:26:45 -0800 (PST) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [RFC PATCH 6/9] cli: fix another warning about variadic macros Date: Sun, 8 Jan 2012 01:26:20 +0200 Message-Id: X-Mailer: git-send-email 1.7.5.4 In-Reply-To: References: In-Reply-To: References: 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:27:01 -0000 notmuch-setup.c: In function ‘notmuch_setup_command’: notmuch-setup.c:144:62: warning: ISO C99 requires rest arguments to be used [enabled by default] notmuch-setup.c:174:18: warning: ISO C99 requires rest arguments to be used [enabled by default] Signed-off-by: Jani Nikula --- notmuch-setup.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/notmuch-setup.c b/notmuch-setup.c index c3ea937..7b25680 100644 --- a/notmuch-setup.c +++ b/notmuch-setup.c @@ -102,9 +102,9 @@ notmuch_setup_command (unused (void *ctx), const char **new_tags; size_t new_tags_len; -#define prompt(format, ...) \ +#define __prompt(format, ...) \ do { \ - printf (format, ##__VA_ARGS__); \ + printf (format, __VA_ARGS__); \ fflush (stdout); \ if (getline (&response, &response_size, stdin) < 0) { \ printf ("Exiting.\n"); \ @@ -113,6 +113,9 @@ notmuch_setup_command (unused (void *ctx), chomp_newline (response); \ } while (0) +#define _prompt(format, ...) __prompt(format "%s", __VA_ARGS__) +#define prompt(...) _prompt(__VA_ARGS__, "") + config = notmuch_config_open (ctx, NULL, &is_new); if (is_new) -- 1.7.5.4