From 6d7b29592aa9cac3f10823ea8f33b18893707e83 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sun, 4 Oct 2015 16:27:02 +0200 Subject: Allow use of variadic macros Remove variadic macros restriction (c99, c++11 feature) from README.developer. GCC, Clang, MSVC 2005 all support it. Enable -Wno-variadic-macros in configure.ac and CMakeLists.txt when -Wpedantic is enabled (which would enable -Wvariadic-macros). For all files matching 'define\s*\w+[0-9]\(', replace "FOO[0-9]" by "FOO" and adjust the macro definition accordingly. The nbap dissector was regenerated after adjusting its template and .cnf file. The generated code is the same since all files disabled the debug macros. Discussed at: https://www.wireshark.org/lists/wireshark-dev/201209/msg00142.html https://www.wireshark.org/lists/wireshark-dev/201510/msg00012.html Change-Id: I3b2e22487db817cbbaac774a592669a4f44314b2 Reviewed-on: https://code.wireshark.org/review/10781 Petri-Dish: Peter Wu Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte Reviewed-by: Guy Harris --- doc/README.developer | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'doc/README.developer') diff --git a/doc/README.developer b/doc/README.developer index 4e9f33cdf6..30dc613b31 100644 --- a/doc/README.developer +++ b/doc/README.developer @@ -385,23 +385,6 @@ 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 - Don't use case N ... M: -- cgit v1.2.1