From 54f7552fbc21a3959636225bd8e80ba95fc6750c Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 22 May 2014 09:01:51 -0600 Subject: Change all variadic macros to C99 style --- apps/system/cle/cle.c | 8 ++++---- apps/system/i2c/i2ctool.h | 4 ++-- apps/system/inifile/inifile.c | 8 ++++---- apps/system/vi/vi.c | 8 ++++---- apps/system/zmodem/zm.h | 8 ++++---- 5 files changed, 18 insertions(+), 18 deletions(-) (limited to 'apps/system') diff --git a/apps/system/cle/cle.c b/apps/system/cle/cle.c index 02c5efbd6..ca361c90c 100644 --- a/apps/system/cle/cle.c +++ b/apps/system/cle/cle.c @@ -107,15 +107,15 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # if CONFIG_SYSTEM_CLE_DEBUGLEVEL > 0 -# define cledbg(format, arg...) \ - syslog(EXTRA_FMT format EXTRA_ARG, ##arg) +# define cledbg(format, ...) \ + syslog(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__) # else # define cledbg(x...) # endif # if CONFIG_SYSTEM_CLE_DEBUGLEVEL > 1 -# define clevdbg(format, arg...) \ - syslog(EXTRA_FMT format EXTRA_ARG, ##arg) +# define clevdbg(format, ...) \ + syslog(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__) # else # define clevdbg(x...) # endif diff --git a/apps/system/i2c/i2ctool.h b/apps/system/i2c/i2ctool.h index d8cc07203..beaf8c104 100644 --- a/apps/system/i2c/i2ctool.h +++ b/apps/system/i2c/i2ctool.h @@ -124,9 +124,9 @@ /* Output is via printf but can be changed using this macro */ #ifdef CONFIG_CPP_HAVE_VARARGS -# define i2c_output(v, fmt...) printf(v, ##fmt) +# define i2c_output(v, ...) printf(v, ##__VA_ARGS__) #else -# define i2c_output printf +# define i2c_output printf #endif /**************************************************************************** diff --git a/apps/system/inifile/inifile.c b/apps/system/inifile/inifile.c index 9f196e558..d82c4f127 100644 --- a/apps/system/inifile/inifile.c +++ b/apps/system/inifile/inifile.c @@ -62,15 +62,15 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # if CONFIG_SYSTEM_INIFILE_DEBUGLEVEL > 0 -# define inidbg(format, arg...) \ - printf(EXTRA_FMT format EXTRA_ARG, ##arg) +# define inidbg(format, ...) \ + printf(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__) # else # define inidbg(x...) # endif # if CONFIG_SYSTEM_INIFILE_DEBUGLEVEL > 1 -# define inivdbg(format, arg...) \ - printf(EXTRA_FMT format EXTRA_ARG, ##arg) +# define inivdbg(format, ...) \ + printf(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__) # else # define inivdbg(x...) # endif diff --git a/apps/system/vi/vi.c b/apps/system/vi/vi.c index 4fbc643a8..35b2a8610 100644 --- a/apps/system/vi/vi.c +++ b/apps/system/vi/vi.c @@ -149,8 +149,8 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # if CONFIG_SYSTEM_VI_DEBUGLEVEL > 0 -# define vidbg(format, arg...) \ - syslog(EXTRA_FMT format EXTRA_ARG, ##arg) +# define vidbg(format, ...) \ + syslog(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__) # define vvidbg(format, ap) \ vsyslog(format, ap) # else @@ -159,8 +159,8 @@ # endif # if CONFIG_SYSTEM_VI_DEBUGLEVEL > 1 -# define vivdbg(format, arg...) \ - syslog(EXTRA_FMT format EXTRA_ARG, ##arg) +# define vivdbg(format, ...) \ + syslog(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__) # else # define vivdbg(x...) # endif diff --git a/apps/system/zmodem/zm.h b/apps/system/zmodem/zm.h index ec653d796..88c46a269 100644 --- a/apps/system/zmodem/zm.h +++ b/apps/system/zmodem/zm.h @@ -229,16 +229,16 @@ */ #ifdef CONFIG_DEBUG_ZMODEM -# define zmprintf(format, arg...) fprintf(stderr, format, ##arg) -# define zmdbg(format, arg...) fprintf(stderr, EXTRA_FMT format EXTRA_ARG, ##arg) +# define zmprintf(format, ...) fprintf(stderr, format, ##__VA_ARGS__) +# define zmdbg(format, ...) fprintf(stderr, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__) #else # undef CONFIG_SYSTEM_ZMODEM_DUMPBUFFER # ifdef CONFIG_CPP_HAVE_VARARGS # define zmprintf(x...) # define zmdbg(x...) # else -# define zmprintf (void) -# define zmdbg (void) +# define zmprintf (void) +# define zmdbg (void) # endif #endif -- cgit v1.2.3