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 83B5C40EF04 for ; Sat, 7 Jan 2012 15:26:47 -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 FWu5taBLSJYj for ; Sat, 7 Jan 2012 15:26:46 -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 CE23140EEEA for ; Sat, 7 Jan 2012 15:26:43 -0800 (PST) Received: by mail-ey0-f181.google.com with SMTP id i1so1939016eaa.26 for ; Sat, 07 Jan 2012 15:26:43 -0800 (PST) Received: by 10.213.5.20 with SMTP id 20mr547559ebt.112.1325978803410; Sat, 07 Jan 2012 15:26:43 -0800 (PST) Received: from localhost (dsl-hkibrasgw4-fe5cdc00-23.dhcp.inet.fi. [80.220.92.23]) by mx.google.com with ESMTPS id e12sm117864982eea.5.2012.01.07.15.26.41 (version=SSLv3 cipher=OTHER); Sat, 07 Jan 2012 15:26:42 -0800 (PST) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [RFC PATCH 5/9] cli: fix warning about variadic macros Date: Sun, 8 Jan 2012 01:26:19 +0200 Message-Id: <0c0e78b61e30129384d34a540f8e52479ea9f06f.1325977940.git.jani@nikula.org> 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:26:47 -0000 notmuch-restore.c: In function ‘notmuch_restore_command’: notmuch-restore.c:87:54: warning: ISO C99 requires rest arguments to be used [enabled by default] and elsewhere. ##__VA_ARGS__ is a GCC CPP extension. Signed-off-by: Jani Nikula --- notmuch-client.h | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/notmuch-client.h b/notmuch-client.h index 517c010..3f4751a 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -93,14 +93,17 @@ typedef struct notmuch_show_params { * * Note that __location__ comes from talloc.h. */ -#define INTERNAL_ERROR(format, ...) \ + +#define _INTERNAL_ERROR(format, ...) \ do { \ fprintf(stderr, \ - "Internal error: " format " (%s)\n", \ - ##__VA_ARGS__, __location__); \ + "Internal error: " format "%s (%s)\n", \ + __VA_ARGS__, __location__); \ exit (1); \ } while (0) +#define INTERNAL_ERROR(...) _INTERNAL_ERROR(__VA_ARGS__, "") + #define ARRAY_SIZE(arr) (sizeof (arr) / sizeof (arr[0])) #define STRNCMP_LITERAL(var, literal) \ -- 1.7.5.4