From 98030f92e8007fedde1e457438c3faa1e26cd3d4 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Tue, 22 Aug 2017 11:39:35 +0100 Subject: [PATCH] xmlconfig: use the portable __VA_ARGS__ MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Follow the example used through mesa and use "..." + "__VA_ARGS__". The former tends to be more common and portable. v2: use ##__VA_ARGS__ (Eric) Signed-off-by: Emil Velikov Reviewed-by: Eric Engestrom Reviewed-by: Nicolai Hähnle --- src/util/xmlconfig.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/util/xmlconfig.c b/src/util/xmlconfig.c index d3f47ecda0c..60a6331c86c 100644 --- a/src/util/xmlconfig.c +++ b/src/util/xmlconfig.c @@ -466,11 +466,11 @@ __driUtilMessage(const char *f, ...) (int) XML_GetCurrentLineNumber(data->parser), \ (int) XML_GetCurrentColumnNumber(data->parser)); \ } while (0) -#define XML_WARNING(msg,args...) do { \ +#define XML_WARNING(msg, ...) do { \ __driUtilMessage ("Warning in %s line %d, column %d: "msg, data->name, \ (int) XML_GetCurrentLineNumber(data->parser), \ (int) XML_GetCurrentColumnNumber(data->parser), \ - args); \ + ##__VA_ARGS__); \ } while (0) /** \brief Output an error message. */ #define XML_ERROR1(msg) do { \ @@ -478,11 +478,11 @@ __driUtilMessage(const char *f, ...) (int) XML_GetCurrentLineNumber(data->parser), \ (int) XML_GetCurrentColumnNumber(data->parser)); \ } while (0) -#define XML_ERROR(msg,args...) do { \ +#define XML_ERROR(msg, ...) do { \ __driUtilMessage ("Error in %s line %d, column %d: "msg, data->name, \ (int) XML_GetCurrentLineNumber(data->parser), \ (int) XML_GetCurrentColumnNumber(data->parser), \ - args); \ + ##__VA_ARGS__); \ } while (0) /** \brief Output a fatal error message and abort. */ #define XML_FATAL1(msg) do { \ @@ -492,12 +492,12 @@ __driUtilMessage(const char *f, ...) (int) XML_GetCurrentColumnNumber(data->parser)); \ abort();\ } while (0) -#define XML_FATAL(msg,args...) do { \ +#define XML_FATAL(msg, ...) do { \ fprintf (stderr, "Fatal error in %s line %d, column %d: "msg"\n", \ data->name, \ (int) XML_GetCurrentLineNumber(data->parser), \ (int) XML_GetCurrentColumnNumber(data->parser), \ - args); \ + ##__VA_ARGS__); \ abort();\ } while (0) -- 2.30.2