Use ... and forward with __VA_ARGS__ instead of args... and args.
Neither mechanism is conformant with the standard but the former works
with both GCC and MSVC.

Signed-off-by: Tyler Retzlaff <roret...@linux.microsoft.com>
---
 lib/metrics/rte_metrics_telemetry.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/metrics/rte_metrics_telemetry.c 
b/lib/metrics/rte_metrics_telemetry.c
index b8c9d75..0f26726 100644
--- a/lib/metrics/rte_metrics_telemetry.c
+++ b/lib/metrics/rte_metrics_telemetry.c
@@ -19,14 +19,14 @@
 #define RTE_LOGTYPE_METRICS metrics_log_level
 
 /* Logging Macros */
-#define METRICS_LOG(level, fmt, args...) \
-       RTE_LOG_LINE(level, METRICS, "%s(): "fmt, __func__, ## args)
+#define METRICS_LOG(level, fmt, ...) \
+       RTE_LOG_LINE(level, METRICS, "%s(): "fmt, __func__, ## __VA_ARGS__)
 
-#define METRICS_LOG_ERR(fmt, args...) \
-       METRICS_LOG(ERR, fmt, ## args)
+#define METRICS_LOG_ERR(fmt, ...) \
+       METRICS_LOG(ERR, fmt, ## __VA_ARGS__)
 
-#define METRICS_LOG_WARN(fmt, args...) \
-       METRICS_LOG(WARNING, fmt, ## args)
+#define METRICS_LOG_WARN(fmt, ...) \
+       METRICS_LOG(WARNING, fmt, ## __VA_ARGS__)
 
 static int32_t
 rte_metrics_tel_reg_port_ethdev_to_metrics(uint16_t port_id)
-- 
1.8.3.1

Reply via email to