From: Emil Velikov Date: Tue, 22 Aug 2017 10:39:35 +0000 (+0100) Subject: xmlconfig: use the portable __VA_ARGS__ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=98030f92e8007fedde1e457438c3faa1e26cd3d4;p=mesa.git xmlconfig: use the portable __VA_ARGS__ 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 --- 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)