diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-05-22 09:01:51 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-05-22 09:01:51 -0600 |
commit | 54f7552fbc21a3959636225bd8e80ba95fc6750c (patch) | |
tree | 9cc321d2ef1c24efd225f33840e2349bb6e4abd2 /apps | |
parent | 34cc8f19dfc278d546a9dd8c00eebabe0bc3094d (diff) | |
download | nuttx-54f7552fbc21a3959636225bd8e80ba95fc6750c.tar.gz nuttx-54f7552fbc21a3959636225bd8e80ba95fc6750c.tar.bz2 nuttx-54f7552fbc21a3959636225bd8e80ba95fc6750c.zip |
Change all variadic macros to C99 style
Diffstat (limited to 'apps')
-rw-r--r-- | apps/examples/elf/elf_main.c | 8 | ||||
-rw-r--r-- | apps/examples/nxflat/nxflat_main.c | 8 | ||||
-rw-r--r-- | apps/examples/posix_spawn/spawn_main.c | 8 | ||||
-rw-r--r-- | apps/netutils/thttpd/fdwatch.c | 8 | ||||
-rw-r--r-- | apps/nshlib/nsh_console.h | 2 | ||||
-rw-r--r-- | apps/system/cle/cle.c | 8 | ||||
-rw-r--r-- | apps/system/i2c/i2ctool.h | 4 | ||||
-rw-r--r-- | apps/system/inifile/inifile.c | 8 | ||||
-rw-r--r-- | apps/system/vi/vi.c | 8 | ||||
-rw-r--r-- | apps/system/zmodem/zm.h | 8 |
10 files changed, 35 insertions, 35 deletions
diff --git a/apps/examples/elf/elf_main.c b/apps/examples/elf/elf_main.c index e1bdb4aa5..88c6e804f 100644 --- a/apps/examples/elf/elf_main.c +++ b/apps/examples/elf/elf_main.c @@ -106,11 +106,11 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_DEBUG -# define message(format, arg...) dbg(format, ##arg) -# define err(format, arg...) dbg(format, ##arg) +# define message(format, ...) dbg(format, ##__VA_ARGS__) +# define err(format, ...) dbg(format, ##__VA_ARGS__) # else -# define message(format, arg...) printf(format, ##arg) -# define err(format, arg...) fprintf(stderr, format, ##arg) +# define message(format, ...) printf(format, ##__VA_ARGS__) +# define err(format, ...) fprintf(stderr, format, ##__VA_ARGS__) # endif #else # ifdef CONFIG_DEBUG diff --git a/apps/examples/nxflat/nxflat_main.c b/apps/examples/nxflat/nxflat_main.c index e3b06addb..b47b76771 100644 --- a/apps/examples/nxflat/nxflat_main.c +++ b/apps/examples/nxflat/nxflat_main.c @@ -102,11 +102,11 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_DEBUG -# define message(format, arg...) dbg(format, ##arg) -# define err(format, arg...) dbg(format, ##arg) +# define message(format, ...) dbg(format, ##__VA_ARGS__) +# define err(format, ...) dbg(format, ##__VA_ARGS__) # else -# define message(format, arg...) printf(format, ##arg) -# define err(format, arg...) fprintf(stderr, format, ##arg) +# define message(format, ...) printf(format, ##__VA_ARGS__) +# define err(format, ...) fprintf(stderr, format, ##__VA_ARGS__) # endif #else # ifdef CONFIG_DEBUG diff --git a/apps/examples/posix_spawn/spawn_main.c b/apps/examples/posix_spawn/spawn_main.c index efb6c1af1..dff0f7c1e 100644 --- a/apps/examples/posix_spawn/spawn_main.c +++ b/apps/examples/posix_spawn/spawn_main.c @@ -109,11 +109,11 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_DEBUG -# define message(format, arg...) dbg(format, ##arg) -# define err(format, arg...) dbg(format, ##arg) +# define message(format, ...) dbg(format, ##__VA_ARGS__) +# define err(format, ...) dbg(format, ##__VA_ARGS__) # else -# define message(format, arg...) printf(format, ##arg) -# define err(format, arg...) fprintf(stderr, format, ##arg) +# define message(format, ...) printf(format, ##__VA_ARGS__) +# define err(format, ...) fprintf(stderr, format, ##__VA_ARGS__) # endif #else # ifdef CONFIG_DEBUG diff --git a/apps/netutils/thttpd/fdwatch.c b/apps/netutils/thttpd/fdwatch.c index 8a578b40c..ba955f420 100644 --- a/apps/netutils/thttpd/fdwatch.c +++ b/apps/netutils/thttpd/fdwatch.c @@ -63,10 +63,10 @@ #ifdef CONFIG_THTTPD_FDWATCH_DEBUG # ifdef CONFIG_CPP_HAVE_VARARGS -# define fwdbg(format, arg...) ndbg(format, ##arg) -# define fwlldbg(format, arg...) nlldbg(format, ##arg) -# define fwvdbg(format, arg...) nvdbg(format, ##arg) -# define fwllvdbg(format, arg...) nllvdbg(format, ##arg) +# define fwdbg(format, ...) ndbg(format, ##__VA_ARGS__) +# define fwlldbg(format, ...) nlldbg(format, ##__VA_ARGS__) +# define fwvdbg(format, ...) nvdbg(format, ##__VA_ARGS__) +# define fwllvdbg(format, ...) nllvdbg(format, ##__VA_ARGS__) # else # define fwdbg ndbg # define fwlldbg nlldbg diff --git a/apps/nshlib/nsh_console.h b/apps/nshlib/nsh_console.h index b02c59dc6..8731b6bf1 100644 --- a/apps/nshlib/nsh_console.h +++ b/apps/nshlib/nsh_console.h @@ -63,7 +63,7 @@ #define nsh_exit(v,s) (v)->exit(v,s) #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/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 |