forked from osmocom/wireshark
Note that variadic macros shouldn't be used.
svn path=/trunk/; revision=12224
This commit is contained in:
parent
8b8e67ccbe
commit
5a244d166b
|
@ -241,6 +241,23 @@ to implement it. Use something like
|
|||
|
||||
instead.
|
||||
|
||||
Don't use "variadic macros", such as
|
||||
|
||||
#define DBG(format, args...) fprintf(stderr, format, ## args)
|
||||
|
||||
as not all C compilers support them. Use macros that take a fixed
|
||||
number of arguments, such as
|
||||
|
||||
#define DBG0(format) fprintf(stderr, format)
|
||||
#define DBG1(format, arg1) fprintf(stderr, format, arg1)
|
||||
#define DBG2(format, arg1, arg2) fprintf(stderr, format, arg1, arg2)
|
||||
|
||||
...
|
||||
|
||||
or something such as
|
||||
|
||||
#define DBG(args) printf args
|
||||
|
||||
snprintf() -> g_snprintf()
|
||||
snprintf() is not available on all platforms, so it's a good idea to use the
|
||||
g_snprintf() function declared by <glib.h> instead.
|
||||
|
|
Loading…
Reference in New Issue