summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-05-22 09:01:51 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-05-22 09:01:51 -0600
commit54f7552fbc21a3959636225bd8e80ba95fc6750c (patch)
tree9cc321d2ef1c24efd225f33840e2349bb6e4abd2 /nuttx
parent34cc8f19dfc278d546a9dd8c00eebabe0bc3094d (diff)
downloadnuttx-54f7552fbc21a3959636225bd8e80ba95fc6750c.tar.gz
nuttx-54f7552fbc21a3959636225bd8e80ba95fc6750c.tar.bz2
nuttx-54f7552fbc21a3959636225bd8e80ba95fc6750c.zip
Change all variadic macros to C99 style
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/arch/arm/include/calypso/debug.h2
-rw-r--r--nuttx/arch/arm/src/armv6-m/up_hardfault.c2
-rw-r--r--nuttx/arch/arm/src/armv6-m/up_svcall.c2
-rw-r--r--nuttx/arch/arm/src/armv7-m/up_hardfault.c2
-rw-r--r--nuttx/arch/arm/src/armv7-m/up_memfault.c2
-rw-r--r--nuttx/arch/arm/src/armv7-m/up_svcall.c2
-rw-r--r--nuttx/arch/mips/src/mips32/up_swint0.c2
-rw-r--r--nuttx/arch/sim/src/up_deviceimage.c6
-rw-r--r--nuttx/arch/sim/src/up_lcd.c2
-rw-r--r--nuttx/configs/16z/tools/zneo-zdsii-5_0_1-variadic-func-fix.patch2
-rw-r--r--nuttx/configs/compal_e99/src/ssd1783.c3
-rwxr-xr-xnuttx/configs/hymini-stm32v/src/up_r61505u.c2
-rw-r--r--nuttx/configs/kwikstik-k40/src/up_lcd.c2
-rw-r--r--nuttx/configs/lm3s6965-ek/src/up_oled.c6
-rw-r--r--nuttx/configs/lm3s8962-ek/src/up_oled.c6
-rw-r--r--nuttx/configs/lpcxpresso-lpc1768/src/up_oled.c6
-rw-r--r--nuttx/configs/maple/src/up_lcd.c2
-rw-r--r--nuttx/configs/olimex-lpc1766stk/src/lpc17_lcd.c4
-rw-r--r--nuttx/configs/sam3u-ek/src/up_lcd.c6
-rw-r--r--nuttx/configs/sam4l-xplained/src/sam_ug2832hsweg04.c4
-rw-r--r--nuttx/configs/samd20-xplained/src/sam_ug2832hsweg04.c4
-rw-r--r--nuttx/configs/stm3210e-eval/src/up_lcd.c2
-rw-r--r--nuttx/configs/stm32f4discovery/src/stm32_ug2864ambag01.c4
-rw-r--r--nuttx/configs/stm32f4discovery/src/stm32_ug2864hsweg01.c4
-rw-r--r--nuttx/configs/us7032evb1/shterm/shterm.c4
-rw-r--r--nuttx/configs/z16f2800100zcog/tools/zneo-zdsii-5_0_1-variadic-func-fix.patch2
-rw-r--r--nuttx/configs/zp214xpa/src/up_ug2864ambag01.c4
-rw-r--r--nuttx/drivers/lcd/memlcd.c4
-rw-r--r--nuttx/drivers/lcd/nokia6100.c2
-rw-r--r--nuttx/drivers/lcd/p14201.c2
-rw-r--r--nuttx/drivers/lcd/skeleton.c2
-rw-r--r--nuttx/drivers/lcd/ssd1306.c4
-rw-r--r--nuttx/drivers/lcd/st7567.c2
-rw-r--r--nuttx/drivers/lcd/ug-2864ambag01.c4
-rw-r--r--nuttx/drivers/lcd/ug-9664hswag01.c2
-rw-r--r--nuttx/drivers/mmcsd/mmcsd_debug.c2
-rw-r--r--nuttx/drivers/usbdev/usbmsc.h4
-rw-r--r--nuttx/include/debug.h124
-rw-r--r--nuttx/include/nuttx/wireless/nrf24l01.h8
-rw-r--r--nuttx/libc/misc/lib_dumpbuffer.c4
-rw-r--r--nuttx/mm/mm_gran.h8
-rw-r--r--nuttx/net/uip/uip_igmpgroup.c8
-rw-r--r--nuttx/net/uip/uip_igmptimer.c8
43 files changed, 139 insertions, 138 deletions
diff --git a/nuttx/arch/arm/include/calypso/debug.h b/nuttx/arch/arm/include/calypso/debug.h
index 27c4185d7..8c7b9aabf 100644
--- a/nuttx/arch/arm/include/calypso/debug.h
+++ b/nuttx/arch/arm/include/calypso/debug.h
@@ -20,7 +20,7 @@
#define dputchar(x) putchar(x)
#define dputs(x) puts(x)
#define dphex(x,y) phex(x,y)
-#define printd(x, args ...) printf(x, ## args)
+#define printd(x, ...) printf(x, ##__VA_ARGS__)
#else
#define dputchar(x)
#define dputs(x)
diff --git a/nuttx/arch/arm/src/armv6-m/up_hardfault.c b/nuttx/arch/arm/src/armv6-m/up_hardfault.c
index a2a0982a7..18126e2f4 100644
--- a/nuttx/arch/arm/src/armv6-m/up_hardfault.c
+++ b/nuttx/arch/arm/src/armv6-m/up_hardfault.c
@@ -56,7 +56,7 @@
****************************************************************************/
#ifdef CONFIG_DEBUG_HARDFAULT
-# define hfdbg(format, arg...) lldbg(format, ##arg)
+# define hfdbg(format, ...) lldbg(format, ##__VA_ARGS__)
#else
# define hfdbg(x...)
#endif
diff --git a/nuttx/arch/arm/src/armv6-m/up_svcall.c b/nuttx/arch/arm/src/armv6-m/up_svcall.c
index ef9ca5c05..2f643adf7 100644
--- a/nuttx/arch/arm/src/armv6-m/up_svcall.c
+++ b/nuttx/arch/arm/src/armv6-m/up_svcall.c
@@ -70,7 +70,7 @@
*/
#if defined(CONFIG_DEBUG_SYSCALL) || defined(CONFIG_DEBUG_SVCALL)
-# define svcdbg(format, arg...) lldbg(format, ##arg)
+# define svcdbg(format, ...) lldbg(format, ##__VA_ARGS__)
#else
# define svcdbg(x...)
#endif
diff --git a/nuttx/arch/arm/src/armv7-m/up_hardfault.c b/nuttx/arch/arm/src/armv7-m/up_hardfault.c
index 3de86818f..1fab28040 100644
--- a/nuttx/arch/arm/src/armv7-m/up_hardfault.c
+++ b/nuttx/arch/arm/src/armv7-m/up_hardfault.c
@@ -61,7 +61,7 @@
*/
#ifdef CONFIG_DEBUG_HARDFAULT
-# define hfdbg(format, arg...) lldbg(format, ##arg)
+# define hfdbg(format, ...) lldbg(format, ##__VA_ARGS__)
#else
# define hfdbg(x...)
#endif
diff --git a/nuttx/arch/arm/src/armv7-m/up_memfault.c b/nuttx/arch/arm/src/armv7-m/up_memfault.c
index 6ab160d03..8d5fdb461 100644
--- a/nuttx/arch/arm/src/armv7-m/up_memfault.c
+++ b/nuttx/arch/arm/src/armv7-m/up_memfault.c
@@ -56,7 +56,7 @@
#undef DEBUG_MEMFAULTS /* Define to debug memory management faults */
#ifdef DEBUG_MEMFAULTS
-# define mfdbg(format, arg...) lldbg(format, ##arg)
+# define mfdbg(format, ...) lldbg(format, ##__VA_ARGS__)
#else
# define mfdbg(x...)
#endif
diff --git a/nuttx/arch/arm/src/armv7-m/up_svcall.c b/nuttx/arch/arm/src/armv7-m/up_svcall.c
index 40abb41c8..bae1b17d0 100644
--- a/nuttx/arch/arm/src/armv7-m/up_svcall.c
+++ b/nuttx/arch/arm/src/armv7-m/up_svcall.c
@@ -70,7 +70,7 @@
*/
#if defined(CONFIG_DEBUG_SYSCALL) || defined(CONFIG_DEBUG_SVCALL)
-# define svcdbg(format, arg...) lldbg(format, ##arg)
+# define svcdbg(format, ...) lldbg(format, ##__VA_ARGS__)
#else
# define svcdbg(x...)
#endif
diff --git a/nuttx/arch/mips/src/mips32/up_swint0.c b/nuttx/arch/mips/src/mips32/up_swint0.c
index 0f9bde459..5b1c2067c 100644
--- a/nuttx/arch/mips/src/mips32/up_swint0.c
+++ b/nuttx/arch/mips/src/mips32/up_swint0.c
@@ -65,7 +65,7 @@
*/
#ifdef CONFIG_DEBUG_SYSCALL
-# define swidbg(format, arg...) lldbg(format, ##arg)
+# define swidbg(format, ...) lldbg(format, ##__VA_ARGS__)
#else
# define swidbg(x...)
#endif
diff --git a/nuttx/arch/sim/src/up_deviceimage.c b/nuttx/arch/sim/src/up_deviceimage.c
index e1f2210f2..ea9e3a5a0 100644
--- a/nuttx/arch/sim/src/up_deviceimage.c
+++ b/nuttx/arch/sim/src/up_deviceimage.c
@@ -58,9 +58,9 @@
****************************************************************************/
#ifdef VFAT_STANDALONE
-# define sdbg(format, arg...) printf(format, ##arg)
-# define kmalloc(size) malloc(size)
-# define kfree(mem) free(mem)
+# define sdbg(format, ...) printf(format, ##__VA_ARGS__)
+# define kmalloc(size) malloc(size)
+# define kfree(mem) free(mem)
#endif
/****************************************************************************
diff --git a/nuttx/arch/sim/src/up_lcd.c b/nuttx/arch/sim/src/up_lcd.c
index abbb2a8e0..fb815d12e 100644
--- a/nuttx/arch/sim/src/up_lcd.c
+++ b/nuttx/arch/sim/src/up_lcd.c
@@ -115,7 +115,7 @@
#endif
#ifdef CONFIG_DEBUG_LCD
-# define lcddbg(format, arg...) vdbg(format, ##arg)
+# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__)
#else
# define lcddbg(x...)
#endif
diff --git a/nuttx/configs/16z/tools/zneo-zdsii-5_0_1-variadic-func-fix.patch b/nuttx/configs/16z/tools/zneo-zdsii-5_0_1-variadic-func-fix.patch
index 895cb47ed..d1eb29ba6 100644
--- a/nuttx/configs/16z/tools/zneo-zdsii-5_0_1-variadic-func-fix.patch
+++ b/nuttx/configs/16z/tools/zneo-zdsii-5_0_1-variadic-func-fix.patch
@@ -130,7 +130,7 @@ index c78362f..207f9b9 100644
+#if 0
#ifdef CONFIG_CPP_HAVE_VARARGS
- # define nsh_output(v, fmt...) (v)->output(v, ##fmt)
+ # define nsh_output(v, ...) (v)->output(v, ##__VA_ARGS__)
#else
# define nsh_output vtbl->output
#endif
diff --git a/nuttx/configs/compal_e99/src/ssd1783.c b/nuttx/configs/compal_e99/src/ssd1783.c
index ac7f8b13c..64ed6a2e7 100644
--- a/nuttx/configs/compal_e99/src/ssd1783.c
+++ b/nuttx/configs/compal_e99/src/ssd1783.c
@@ -65,8 +65,9 @@
# define LCD_YRES 67
/* Debug ******************************************************************************/
+
#ifdef CONFIG_DEBUG_LCD
-# define lcddbg(format, arg...) vdbg(format, ##arg)
+# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__)
#else
# define lcddbg(x...)
#endif
diff --git a/nuttx/configs/hymini-stm32v/src/up_r61505u.c b/nuttx/configs/hymini-stm32v/src/up_r61505u.c
index f894a3de0..af05382a5 100755
--- a/nuttx/configs/hymini-stm32v/src/up_r61505u.c
+++ b/nuttx/configs/hymini-stm32v/src/up_r61505u.c
@@ -94,7 +94,7 @@
/* Debug ******************************************************************************/
#ifdef CONFIG_DEBUG_LCD
-# define lcddbg(format, arg...) vdbg(format, ##arg)
+# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__)
#else
# define lcddbg(x...)
#endif
diff --git a/nuttx/configs/kwikstik-k40/src/up_lcd.c b/nuttx/configs/kwikstik-k40/src/up_lcd.c
index ff2343c45..2e28701af 100644
--- a/nuttx/configs/kwikstik-k40/src/up_lcd.c
+++ b/nuttx/configs/kwikstik-k40/src/up_lcd.c
@@ -61,7 +61,7 @@
/* Debug ******************************************************************************/
#ifdef CONFIG_DEBUG_LCD
-# define lcddbg(format, arg...) vdbg(format, ##arg)
+# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__)
#else
# define lcddbg(x...)
#endif
diff --git a/nuttx/configs/lm3s6965-ek/src/up_oled.c b/nuttx/configs/lm3s6965-ek/src/up_oled.c
index 6f95c599a..2f10891f4 100644
--- a/nuttx/configs/lm3s6965-ek/src/up_oled.c
+++ b/nuttx/configs/lm3s6965-ek/src/up_oled.c
@@ -71,9 +71,9 @@
#endif
#ifdef CONFIG_LCD_RITDEBUG
-# define ritdbg(format, arg...) vdbg(format, ##arg)
-# define oleddc_dumpgpio(m) tiva_dumpgpio(OLEDDC_GPIO, m)
-# define oledcs_dumpgpio(m) tiva_dumpgpio(OLEDCS_GPIO, m)
+# define ritdbg(format, ...) vdbg(format, ##__VA_ARGS__)
+# define oleddc_dumpgpio(m) tiva_dumpgpio(OLEDDC_GPIO, m)
+# define oledcs_dumpgpio(m) tiva_dumpgpio(OLEDCS_GPIO, m)
#else
# define ritdbg(x...)
# define oleddc_dumpgpio(m)
diff --git a/nuttx/configs/lm3s8962-ek/src/up_oled.c b/nuttx/configs/lm3s8962-ek/src/up_oled.c
index f331a2f0e..baf258d2a 100644
--- a/nuttx/configs/lm3s8962-ek/src/up_oled.c
+++ b/nuttx/configs/lm3s8962-ek/src/up_oled.c
@@ -71,9 +71,9 @@
#endif
#ifdef CONFIG_LCD_RITDEBUG
-# define ritdbg(format, arg...) vdbg(format, ##arg)
-# define oleddc_dumpgpio(m) tiva_dumpgpio(OLEDDC_GPIO, m)
-# define oledcs_dumpgpio(m) tiva_dumpgpio(OLEDCS_GPIO, m)
+# define ritdbg(format, ...) vdbg(format, ##__VA_ARGS__)
+# define oleddc_dumpgpio(m) tiva_dumpgpio(OLEDDC_GPIO, m)
+# define oledcs_dumpgpio(m) tiva_dumpgpio(OLEDCS_GPIO, m)
#else
# define ritdbg(x...)
# define oleddc_dumpgpio(m)
diff --git a/nuttx/configs/lpcxpresso-lpc1768/src/up_oled.c b/nuttx/configs/lpcxpresso-lpc1768/src/up_oled.c
index 00c5b37a8..a91473983 100644
--- a/nuttx/configs/lpcxpresso-lpc1768/src/up_oled.c
+++ b/nuttx/configs/lpcxpresso-lpc1768/src/up_oled.c
@@ -85,9 +85,9 @@
#endif
#ifdef CONFIG_DEBUG_LCD
-# define ugdbg(format, arg...) vdbg(format, ##arg)
-# define oleddc_dumpgpio(m) lpc17_dumpgpio(LPCXPRESSO_OLED_POWER, m)
-# define oledcs_dumpgpio(m) lpc17_dumpgpio(LPCXPRESSO_OLED_CS, m)
+# define ugdbg(format, ...) vdbg(format, ##__VA_ARGS__)
+# define oleddc_dumpgpio(m) lpc17_dumpgpio(LPCXPRESSO_OLED_POWER, m)
+# define oledcs_dumpgpio(m) lpc17_dumpgpio(LPCXPRESSO_OLED_CS, m)
#else
# define ugdbg(x...)
# define oleddc_dumpgpio(m)
diff --git a/nuttx/configs/maple/src/up_lcd.c b/nuttx/configs/maple/src/up_lcd.c
index 832272374..feb284561 100644
--- a/nuttx/configs/maple/src/up_lcd.c
+++ b/nuttx/configs/maple/src/up_lcd.c
@@ -83,7 +83,7 @@
#endif
#ifdef CONFIG_DEBUG_LCD
-# define lcddbg(format, arg...) vdbg(format, ##arg)
+# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__)
#else
# define lcddbg(x...)
#endif
diff --git a/nuttx/configs/olimex-lpc1766stk/src/lpc17_lcd.c b/nuttx/configs/olimex-lpc1766stk/src/lpc17_lcd.c
index e44d9972b..4fa4d400d 100644
--- a/nuttx/configs/olimex-lpc1766stk/src/lpc17_lcd.c
+++ b/nuttx/configs/olimex-lpc1766stk/src/lpc17_lcd.c
@@ -86,8 +86,8 @@
#endif
#ifdef CONFIG_LCD_NOKIADBG
-# define lcddbg(format, arg...) vdbg(format, ##arg)
-# define lcd_dumpgpio(m) lpc17_dumpgpio(LPC1766STK_LCD_RST, m)
+# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__)
+# define lcd_dumpgpio(m) lpc17_dumpgpio(LPC1766STK_LCD_RST, m)
#else
# define lcddbg(x...)
# define lcd_dumpgpio(m)
diff --git a/nuttx/configs/sam3u-ek/src/up_lcd.c b/nuttx/configs/sam3u-ek/src/up_lcd.c
index 393e41f52..23a0e873e 100644
--- a/nuttx/configs/sam3u-ek/src/up_lcd.c
+++ b/nuttx/configs/sam3u-ek/src/up_lcd.c
@@ -159,14 +159,14 @@
/* Debug ******************************************************************************/
#ifdef CONFIG_LCD_REGDEBUG
-# define regdbg(format, arg...) vdbg(format, ##arg)
+# define regdbg(format, ...) vdbg(format, ##__VA_ARGS__)
#else
# define regdbg(x...)
#endif
#ifdef CONFIG_DEBUG_LCD
-# define lcddbg(format, arg...) dbg(format, ##arg)
-# define lcdvdbg(format, arg...) vdbg(format, ##arg)
+# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
#else
# define lcddbg(x...)
# define lcdvdbg(x...)
diff --git a/nuttx/configs/sam4l-xplained/src/sam_ug2832hsweg04.c b/nuttx/configs/sam4l-xplained/src/sam_ug2832hsweg04.c
index c4a40b9c0..10000eb5e 100644
--- a/nuttx/configs/sam4l-xplained/src/sam_ug2832hsweg04.c
+++ b/nuttx/configs/sam4l-xplained/src/sam_ug2832hsweg04.c
@@ -114,8 +114,8 @@
/* Debug ********************************************************************/
#ifdef CONFIG_DEBUG_LCD
-# define lcddbg(format, arg...) dbg(format, ##arg)
-# define lcdvdbg(format, arg...) vdbg(format, ##arg)
+# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
#else
# define lcddbg(x...)
# define lcdvdbg(x...)
diff --git a/nuttx/configs/samd20-xplained/src/sam_ug2832hsweg04.c b/nuttx/configs/samd20-xplained/src/sam_ug2832hsweg04.c
index 8b4754ab9..bc6fde097 100644
--- a/nuttx/configs/samd20-xplained/src/sam_ug2832hsweg04.c
+++ b/nuttx/configs/samd20-xplained/src/sam_ug2832hsweg04.c
@@ -144,8 +144,8 @@
/* Debug ********************************************************************/
#ifdef CONFIG_DEBUG_LCD
-# define lcddbg(format, arg...) dbg(format, ##arg)
-# define lcdvdbg(format, arg...) vdbg(format, ##arg)
+# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
#else
# define lcddbg(x...)
# define lcdvdbg(x...)
diff --git a/nuttx/configs/stm3210e-eval/src/up_lcd.c b/nuttx/configs/stm3210e-eval/src/up_lcd.c
index 4a65ee4cb..cf446a11f 100644
--- a/nuttx/configs/stm3210e-eval/src/up_lcd.c
+++ b/nuttx/configs/stm3210e-eval/src/up_lcd.c
@@ -312,7 +312,7 @@
/* Debug ******************************************************************************/
#ifdef CONFIG_DEBUG_LCD
-# define lcddbg(format, arg...) vdbg(format, ##arg)
+# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__)
#else
# define lcddbg(x...)
#endif
diff --git a/nuttx/configs/stm32f4discovery/src/stm32_ug2864ambag01.c b/nuttx/configs/stm32f4discovery/src/stm32_ug2864ambag01.c
index 4aa01e40b..fdc6b88f3 100644
--- a/nuttx/configs/stm32f4discovery/src/stm32_ug2864ambag01.c
+++ b/nuttx/configs/stm32f4discovery/src/stm32_ug2864ambag01.c
@@ -93,8 +93,8 @@
/* Debug ********************************************************************/
#ifdef CONFIG_DEBUG_LCD
-# define lcddbg(format, arg...) dbg(format, ##arg)
-# define lcdvdbg(format, arg...) vdbg(format, ##arg)
+# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
#else
# define lcddbg(x...)
# define lcdvdbg(x...)
diff --git a/nuttx/configs/stm32f4discovery/src/stm32_ug2864hsweg01.c b/nuttx/configs/stm32f4discovery/src/stm32_ug2864hsweg01.c
index 5a32a0e42..3366b093d 100644
--- a/nuttx/configs/stm32f4discovery/src/stm32_ug2864hsweg01.c
+++ b/nuttx/configs/stm32f4discovery/src/stm32_ug2864hsweg01.c
@@ -93,8 +93,8 @@
/* Debug ********************************************************************/
#ifdef CONFIG_DEBUG_LCD
-# define lcddbg(format, arg...) dbg(format, ##arg)
-# define lcdvdbg(format, arg...) vdbg(format, ##arg)
+# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
#else
# define lcddbg(x...)
# define lcdvdbg(x...)
diff --git a/nuttx/configs/us7032evb1/shterm/shterm.c b/nuttx/configs/us7032evb1/shterm/shterm.c
index c08b5e17e..455e72f7e 100644
--- a/nuttx/configs/us7032evb1/shterm/shterm.c
+++ b/nuttx/configs/us7032evb1/shterm/shterm.c
@@ -62,8 +62,8 @@
#define DEFAULT_BAUD 9600
-#define dbg(format, arg...) if (debug > 0) printconsole(format, ##arg)
-#define vdbg(format, arg...) if (debug > 1) printconsole(format, ##arg)
+#define dbg(format, ...) if (debug > 0) printconsole(format, ##__VA_ARGS__)
+#define vdbg(format, ...) if (debug > 1) printconsole(format, ##__VA_ARGS__)
/****************************************************************************
* Private Types
diff --git a/nuttx/configs/z16f2800100zcog/tools/zneo-zdsii-5_0_1-variadic-func-fix.patch b/nuttx/configs/z16f2800100zcog/tools/zneo-zdsii-5_0_1-variadic-func-fix.patch
index 895cb47ed..d1eb29ba6 100644
--- a/nuttx/configs/z16f2800100zcog/tools/zneo-zdsii-5_0_1-variadic-func-fix.patch
+++ b/nuttx/configs/z16f2800100zcog/tools/zneo-zdsii-5_0_1-variadic-func-fix.patch
@@ -130,7 +130,7 @@ index c78362f..207f9b9 100644
+#if 0
#ifdef CONFIG_CPP_HAVE_VARARGS
- # define nsh_output(v, fmt...) (v)->output(v, ##fmt)
+ # define nsh_output(v, ...) (v)->output(v, ##__VA_ARGS__)
#else
# define nsh_output vtbl->output
#endif
diff --git a/nuttx/configs/zp214xpa/src/up_ug2864ambag01.c b/nuttx/configs/zp214xpa/src/up_ug2864ambag01.c
index 2c2ae847a..b58877ca2 100644
--- a/nuttx/configs/zp214xpa/src/up_ug2864ambag01.c
+++ b/nuttx/configs/zp214xpa/src/up_ug2864ambag01.c
@@ -99,8 +99,8 @@
/* Debug ********************************************************************/
#ifdef CONFIG_DEBUG_LCD
-# define lcddbg(format, arg...) dbg(format, ##arg)
-# define lcdvdbg(format, arg...) vdbg(format, ##arg)
+# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
#else
# define lcddbg(x...)
# define lcdvdbg(x...)
diff --git a/nuttx/drivers/lcd/memlcd.c b/nuttx/drivers/lcd/memlcd.c
index dd7b534fe..578c30a1c 100644
--- a/nuttx/drivers/lcd/memlcd.c
+++ b/nuttx/drivers/lcd/memlcd.c
@@ -112,8 +112,8 @@
/* Debug */
#ifdef CONFIG_DEBUG_LCD
-# define lcddbg(format, arg...) dbg(format, ##arg)
-# define lcdvdbg(format, arg...) vdbg(format, ##arg)
+# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
#else
# define lcddbg(x...)
# define lcdvdbg(x...)
diff --git a/nuttx/drivers/lcd/nokia6100.c b/nuttx/drivers/lcd/nokia6100.c
index 4fabf7885..3677d8bfe 100644
--- a/nuttx/drivers/lcd/nokia6100.c
+++ b/nuttx/drivers/lcd/nokia6100.c
@@ -308,7 +308,7 @@
/* Debug ******************************************************************************/
#ifdef CONFIG_LCD_REGDEBUG
-# define lcddbg(format, arg...) llvdbg(format, ##arg)
+# define lcddbg(format, ...) llvdbg(format, ##__VA_ARGS__)
#else
# define lcddbg(x...)
#endif
diff --git a/nuttx/drivers/lcd/p14201.c b/nuttx/drivers/lcd/p14201.c
index 094380b59..dbd69a271 100644
--- a/nuttx/drivers/lcd/p14201.c
+++ b/nuttx/drivers/lcd/p14201.c
@@ -180,7 +180,7 @@
/* Debug ******************************************************************************/
#ifdef CONFIG_LCD_RITDEBUG
-# define ritdbg(format, arg...) vdbg(format, ##arg)
+# define ritdbg(format, ...) vdbg(format, ##__VA_ARGS__)
#else
# define ritdbg(x...)
#endif
diff --git a/nuttx/drivers/lcd/skeleton.c b/nuttx/drivers/lcd/skeleton.c
index f161b3a5e..bc58b53a3 100644
--- a/nuttx/drivers/lcd/skeleton.c
+++ b/nuttx/drivers/lcd/skeleton.c
@@ -90,7 +90,7 @@
/* Debug ******************************************************************************/
#ifdef CONFIG_LCD_SKELDEBUG
-# define skeldbg(format, arg...) vdbg(format, ##arg)
+# define skeldbg(format, ...) vdbg(format, ##__VA_ARGS__)
#else
# define skeldbg(x...)
#endif
diff --git a/nuttx/drivers/lcd/ssd1306.c b/nuttx/drivers/lcd/ssd1306.c
index d92075610..32e22e679 100644
--- a/nuttx/drivers/lcd/ssd1306.c
+++ b/nuttx/drivers/lcd/ssd1306.c
@@ -301,8 +301,8 @@
/* Debug ******************************************************************************/
#ifdef CONFIG_DEBUG_LCD
-# define lcddbg(format, arg...) dbg(format, ##arg)
-# define lcdvdbg(format, arg...) vdbg(format, ##arg)
+# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
#else
# define lcddbg(x...)
# define lcdvdbg(x...)
diff --git a/nuttx/drivers/lcd/st7567.c b/nuttx/drivers/lcd/st7567.c
index cc95c603b..179c3d2e5 100644
--- a/nuttx/drivers/lcd/st7567.c
+++ b/nuttx/drivers/lcd/st7567.c
@@ -209,7 +209,7 @@
/* Debst7567 ******************************************************************************/
#ifdef CONFIG_LCD_ST7567DEBUG
-# define st7567dbg(format, arg...) vdbg(format, ##arg)
+# define st7567dbg(format, ...) vdbg(format, ##__VA_ARGS__)
#else
# define st7567dbg(x...)
#endif
diff --git a/nuttx/drivers/lcd/ug-2864ambag01.c b/nuttx/drivers/lcd/ug-2864ambag01.c
index 4879c027f..51706026a 100644
--- a/nuttx/drivers/lcd/ug-2864ambag01.c
+++ b/nuttx/drivers/lcd/ug-2864ambag01.c
@@ -263,8 +263,8 @@
/* Debug ******************************************************************************/
#ifdef CONFIG_DEBUG_LCD
-# define lcddbg(format, arg...) dbg(format, ##arg)
-# define lcdvdbg(format, arg...) vdbg(format, ##arg)
+# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
#else
# define lcddbg(x...)
# define lcdvdbg(x...)
diff --git a/nuttx/drivers/lcd/ug-9664hswag01.c b/nuttx/drivers/lcd/ug-9664hswag01.c
index 1ad2e1150..c649e26ca 100644
--- a/nuttx/drivers/lcd/ug-9664hswag01.c
+++ b/nuttx/drivers/lcd/ug-9664hswag01.c
@@ -224,7 +224,7 @@
/* Debug ******************************************************************************/
#ifdef CONFIG_DEBUG_LCD
-# define lcddbg(format, arg...) vdbg(format, ##arg)
+# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__)
#else
# define lcddbg(x...)
#endif
diff --git a/nuttx/drivers/mmcsd/mmcsd_debug.c b/nuttx/drivers/mmcsd/mmcsd_debug.c
index 8cb5b2a2a..8631c2d71 100644
--- a/nuttx/drivers/mmcsd/mmcsd_debug.c
+++ b/nuttx/drivers/mmcsd/mmcsd_debug.c
@@ -56,7 +56,7 @@
/* This needs to match the logic in include/debug.h */
#ifdef CONFIG_CPP_HAVE_VARARGS
-# define message(format, arg...) syslog(format, ##arg)
+# define message(format, ...) syslog(format, ##__VA_ARGS__)
#else
# define message syslog
#endif
diff --git a/nuttx/drivers/usbdev/usbmsc.h b/nuttx/drivers/usbdev/usbmsc.h
index 3e965d12b..1fa8a83af 100644
--- a/nuttx/drivers/usbdev/usbmsc.h
+++ b/nuttx/drivers/usbdev/usbmsc.h
@@ -209,9 +209,9 @@
#ifdef CONFIG_CPP_HAVE_VARARGS
# ifdef CONFIG_DEBUG
# ifdef CONFIG_ARCH_LOWPUTC
-# define dbgprintf(format, arg...) lowsyslog(format, ##arg)
+# define dbgprintf(format, ...) lowsyslog(format, ##__VA_ARGS__)
# else
-# define dbgprintf(format, arg...) syslog(format, ##arg)
+# define dbgprintf(format, ...) syslog(format, ##__VA_ARGS__)
# endif
# else
# define dbgprintf(x...)
diff --git a/nuttx/include/debug.h b/nuttx/include/debug.h
index 97b7ed798..ba7d1d964 100644
--- a/nuttx/include/debug.h
+++ b/nuttx/include/debug.h
@@ -100,26 +100,26 @@
#ifdef CONFIG_CPP_HAVE_VARARGS
-/* Variable argument macros supported */
+/* C-99 style variadic macros are supported */
#ifdef CONFIG_DEBUG
-# define dbg(format, arg...) \
- syslog(EXTRA_FMT format EXTRA_ARG, ##arg)
+# define dbg(format, ...) \
+ syslog(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
# ifdef CONFIG_ARCH_LOWPUTC
-# define lldbg(format, arg...) \
- lowsyslog(EXTRA_FMT format EXTRA_ARG, ##arg)
+# define lldbg(format, ...) \
+ lowsyslog(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
# else
# define lldbg(x...)
# endif
# ifdef CONFIG_DEBUG_VERBOSE
-# define vdbg(format, arg...) \
- syslog(EXTRA_FMT format EXTRA_ARG, ##arg)
+# define vdbg(format, ...) \
+ syslog(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
# ifdef CONFIG_ARCH_LOWPUTC
-# define llvdbg(format, arg...) \
- lowsyslog(EXTRA_FMT format EXTRA_ARG, ##arg)
+# define llvdbg(format, ...) \
+ lowsyslog(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
# else
# define llvdbg(x...)
# endif
@@ -141,10 +141,10 @@
/* Subsystem specific debug */
#ifdef CONFIG_DEBUG_MM
-# define mdbg(format, arg...) dbg(format, ##arg)
-# define mlldbg(format, arg...) lldbg(format, ##arg)
-# define mvdbg(format, arg...) vdbg(format, ##arg)
-# define mllvdbg(format, arg...) llvdbg(format, ##arg)
+# define mdbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define mlldbg(format, ...) lldbg(format, ##__VA_ARGS__)
+# define mvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
+# define mllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
#else
# define mdbg(x...)
# define mlldbg(x...)
@@ -153,10 +153,10 @@
#endif
#ifdef CONFIG_DEBUG_SCHED
-# define sdbg(format, arg...) dbg(format, ##arg)
-# define slldbg(format, arg...) lldbg(format, ##arg)
-# define svdbg(format, arg...) vdbg(format, ##arg)
-# define sllvdbg(format, arg...) llvdbg(format, ##arg)
+# define sdbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define slldbg(format, ...) lldbg(format, ##__VA_ARGS__)
+# define svdbg(format, ...) vdbg(format, ##__VA_ARGS__)
+# define sllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
#else
# define sdbg(x...)
# define slldbg(x...)
@@ -165,10 +165,10 @@
#endif
#ifdef CONFIG_DEBUG_PAGING
-# define pgdbg(format, arg...) dbg(format, ##arg)
-# define pglldbg(format, arg...) lldbg(format, ##arg)
-# define pgvdbg(format, arg...) vdbg(format, ##arg)
-# define pgllvdbg(format, arg...) llvdbg(format, ##arg)
+# define pgdbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define pglldbg(format, ...) lldbg(format, ##__VA_ARGS__)
+# define pgvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
+# define pgllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
#else
# define pgdbg(x...)
# define pglldbg(x...)
@@ -177,10 +177,10 @@
#endif
#ifdef CONFIG_DEBUG_DMA
-# define dmadbg(format, arg...) dbg(format, ##arg)
-# define dmalldbg(format, arg...) lldbg(format, ##arg)
-# define dmavdbg(format, arg...) vdbg(format, ##arg)
-# define dmallvdbg(format, arg...) llvdbg(format, ##arg)
+# define dmadbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define dmalldbg(format, ...) lldbg(format, ##__VA_ARGS__)
+# define dmavdbg(format, ...) vdbg(format, ##__VA_ARGS__)
+# define dmallvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
#else
# define dmadbg(x...)
# define dmalldbg(x...)
@@ -189,10 +189,10 @@
#endif
#ifdef CONFIG_DEBUG_NET
-# define ndbg(format, arg...) dbg(format, ##arg)
-# define nlldbg(format, arg...) lldbg(format, ##arg)
-# define nvdbg(format, arg...) vdbg(format, ##arg)
-# define nllvdbg(format, arg...) llvdbg(format, ##arg)
+# define ndbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define nlldbg(format, ...) lldbg(format, ##__VA_ARGS__)
+# define nvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
+# define nllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
#else
# define ndbg(x...)
# define nlldbg(x...)
@@ -201,10 +201,10 @@
#endif
#ifdef CONFIG_DEBUG_USB
-# define udbg(format, arg...) dbg(format, ##arg)
-# define ulldbg(format, arg...) lldbg(format, ##arg)
-# define uvdbg(format, arg...) vdbg(format, ##arg)
-# define ullvdbg(format, arg...) llvdbg(format, ##arg)
+# define udbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define ulldbg(format, ...) lldbg(format, ##__VA_ARGS__)
+# define uvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
+# define ullvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
#else
# define udbg(x...)
# define ulldbg(x...)
@@ -213,10 +213,10 @@
#endif
#ifdef CONFIG_DEBUG_FS
-# define fdbg(format, arg...) dbg(format, ##arg)
-# define flldbg(format, arg...) lldbg(format, ##arg)
-# define fvdbg(format, arg...) vdbg(format, ##arg)
-# define fllvdbg(format, arg...) llvdbg(format, ##arg)
+# define fdbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define flldbg(format, ...) lldbg(format, ##__VA_ARGS__)
+# define fvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
+# define fllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
#else
# define fdbg(x...)
# define flldbg(x...)
@@ -225,10 +225,10 @@
#endif
#ifdef CONFIG_DEBUG_INPUT
-# define idbg(format, arg...) dbg(format, ##arg)
-# define illdbg(format, arg...) lldbg(format, ##arg)
-# define ivdbg(format, arg...) vdbg(format, ##arg)
-# define illvdbg(format, arg...) llvdbg(format, ##arg)
+# define idbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define illdbg(format, ...) lldbg(format, ##__VA_ARGS__)
+# define ivdbg(format, ...) vdbg(format, ##__VA_ARGS__)
+# define illvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
#else
# define idbg(x...)
# define illdbg(x...)
@@ -237,10 +237,10 @@
#endif
#ifdef CONFIG_DEBUG_ANALOG
-# define adbg(format, arg...) dbg(format, ##arg)
-# define alldbg(format, arg...) lldbg(format, ##arg)
-# define avdbg(format, arg...) vdbg(format, ##arg)
-# define allvdbg(format, arg...) llvdbg(format, ##arg)
+# define adbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define alldbg(format, ...) lldbg(format, ##__VA_ARGS__)
+# define avdbg(format, ...) vdbg(format, ##__VA_ARGS__)
+# define allvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
#else
# define adbg(x...)
# define alldbg(x...)
@@ -249,10 +249,10 @@
#endif
#ifdef CONFIG_DEBUG_GRAPHICS
-# define gdbg(format, arg...) dbg(format, ##arg)
-# define glldbg(format, arg...) lldbg(format, ##arg)
-# define gvdbg(format, arg...) vdbg(format, ##arg)
-# define gllvdbg(format, arg...) llvdbg(format, ##arg)
+# define gdbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define glldbg(format, ...) lldbg(format, ##__VA_ARGS__)
+# define gvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
+# define gllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
#else
# define gdbg(x...)
# define glldbg(x...)
@@ -261,10 +261,10 @@
#endif
#ifdef CONFIG_DEBUG_BINFMT
-# define bdbg(format, arg...) dbg(format, ##arg)
-# define blldbg(format, arg...) lldbg(format, ##arg)
-# define bvdbg(format, arg...) vdbg(format, ##arg)
-# define bllvdbg(format, arg...) llvdbg(format, ##arg)
+# define bdbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define blldbg(format, ...) lldbg(format, ##__VA_ARGS__)
+# define bvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
+# define bllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
#else
# define bdbg(x...)
# define blldbg(x...)
@@ -273,10 +273,10 @@
#endif
#ifdef CONFIG_DEBUG_LIB
-# define ldbg(format, arg...) dbg(format, ##arg)
-# define llldbg(format, arg...) lldbg(format, ##arg)
-# define lvdbg(format, arg...) vdbg(format, ##arg)
-# define lllvdbg(format, arg...) llvdbg(format, ##arg)
+# define ldbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define llldbg(format, ...) lldbg(format, ##__VA_ARGS__)
+# define lvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
+# define lllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
#else
# define ldbg(x...)
# define llldbg(x...)
@@ -285,10 +285,10 @@
#endif
#ifdef CONFIG_DEBUG_AUDIO
-# define auddbg(format, arg...) dbg(format, ##arg)
-# define audlldbg(format, arg...) lldbg(format, ##arg)
-# define audvdbg(format, arg...) vdbg(format, ##arg)
-# define audllvdbg(format, arg...) llvdbg(format, ##arg)
+# define auddbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define audlldbg(format, ...) lldbg(format, ##__VA_ARGS__)
+# define audvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
+# define audllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
#else
# define auddbg(x...)
# define audlldbg(x...)
@@ -298,7 +298,7 @@
#else /* CONFIG_CPP_HAVE_VARARGS */
-/* Variable argument macros NOT supported */
+/* Variadic macros NOT supported */
#ifdef CONFIG_DEBUG
# ifndef CONFIG_ARCH_LOWPUTC
diff --git a/nuttx/include/nuttx/wireless/nrf24l01.h b/nuttx/include/nuttx/wireless/nrf24l01.h
index 3e2a41ac1..0a96e23b7 100644
--- a/nuttx/include/nuttx/wireless/nrf24l01.h
+++ b/nuttx/include/nuttx/wireless/nrf24l01.h
@@ -91,10 +91,10 @@
/* NRF24L01 debug */
#ifdef NRF24L01_DEBUG
-# define wdbg(format, arg...) dbg(format, ##arg)
-# define wlldbg(format, arg...) lldbg(format, ##arg)
-# define wvdbg(format, arg...) vdbg(format, ##arg)
-# define wllvdbg(format, arg...) llvdbg(format, ##arg)
+# define wdbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define wlldbg(format, ...) lldbg(format, ##__VA_ARGS__)
+# define wvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
+# define wllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
#else
# define wdbg(x...)
# define wlldbg(x...)
diff --git a/nuttx/libc/misc/lib_dumpbuffer.c b/nuttx/libc/misc/lib_dumpbuffer.c
index bd908196d..e05c0ea4d 100644
--- a/nuttx/libc/misc/lib_dumpbuffer.c
+++ b/nuttx/libc/misc/lib_dumpbuffer.c
@@ -51,9 +51,9 @@
#ifdef CONFIG_CPP_HAVE_VARARGS
# ifdef CONFIG_ARCH_LOWPUTC
-# define message(format, arg...) lowsyslog(format, ##arg)
+# define message(format, ...) lowsyslog(format, ##__VA_ARGS__)
# else
-# define message(format, arg...) syslog(format, ##arg)
+# define message(format, ...) syslog(format, ##__VA_ARGS__)
# endif
#else
# ifdef CONFIG_ARCH_LOWPUTC
diff --git a/nuttx/mm/mm_gran.h b/nuttx/mm/mm_gran.h
index a4f51490d..2dd1aef36 100644
--- a/nuttx/mm/mm_gran.h
+++ b/nuttx/mm/mm_gran.h
@@ -63,11 +63,11 @@
#ifdef CONFIG_CPP_HAVE_VARARGS
# ifdef CONFIG_DEBUG_GRAM
-# define gramdbg(format, arg...) dbg(format, ##arg)
-# define gramvdbg(format, arg...) vdbg(format, ##arg)
+# define gramdbg(format, ...) dbg(format, ##__VA_ARGS__)
+# define gramvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
# else
-# define gramdbg(format, arg...) mdbg(format, ##arg)
-# define gramvdbg(format, arg...) mvdbg(format, ##arg)
+# define gramdbg(format, ...) mdbg(format, ##__VA_ARGS__)
+# define gramvdbg(format, ...) mvdbg(format, ##__VA_ARGS__)
# endif
#else
# ifdef CONFIG_DEBUG_GRAM
diff --git a/nuttx/net/uip/uip_igmpgroup.c b/nuttx/net/uip/uip_igmpgroup.c
index 617e47dbe..ab3beb2f4 100644
--- a/nuttx/net/uip/uip_igmpgroup.c
+++ b/nuttx/net/uip/uip_igmpgroup.c
@@ -86,10 +86,10 @@
#ifdef CONFIG_CPP_HAVE_VARARGS
# ifdef IGMP_GRPDEBUG
-# define grpdbg(format, arg...) ndbg(format, ##arg)
-# define grplldbg(format, arg...) nlldbg(format, ##arg)
-# define grpvdbg(format, arg...) nvdbg(format, ##arg)
-# define grpllvdbg(format, arg...) nllvdbg(format, ##arg)
+# define grpdbg(format, ...) ndbg(format, ##__VA_ARGS__)
+# define grplldbg(format, ...) nlldbg(format, ##__VA_ARGS__)
+# define grpvdbg(format, ...) nvdbg(format, ##__VA_ARGS__)
+# define grpllvdbg(format, ...) nllvdbg(format, ##__VA_ARGS__)
# else
# define grpdbg(x...)
# define grplldbg(x...)
diff --git a/nuttx/net/uip/uip_igmptimer.c b/nuttx/net/uip/uip_igmptimer.c
index d6c5dabdd..6c6fa0f84 100644
--- a/nuttx/net/uip/uip_igmptimer.c
+++ b/nuttx/net/uip/uip_igmptimer.c
@@ -70,10 +70,10 @@
#ifdef CONFIG_CPP_HAVE_VARARGS
# ifdef IGMP_GTMRDEBUG
-# define gtmrdbg(format, arg...) ndbg(format, ##arg)
-# define gtmrlldbg(format, arg...) nlldbg(format, ##arg)
-# define gtmrvdbg(format, arg...) nvdbg(format, ##arg)
-# define gtmrllvdbg(format, arg...) nllvdbg(format, ##arg)
+# define gtmrdbg(format, ...) ndbg(format, ##__VA_ARGS__)
+# define gtmrlldbg(format, ...) nlldbg(format, ##__VA_ARGS__)
+# define gtmrvdbg(format, ...) nvdbg(format, ##__VA_ARGS__)
+# define gtmrllvdbg(format, ...) nllvdbg(format, ##__VA_ARGS__)
# else
# define gtmrdbg(x...)
# define gtmrlldbg(x...)