diff options
author | Peter Wu <peter@lekensteyn.nl> | 2015-10-04 16:27:02 +0200 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-10-05 07:57:14 +0000 |
commit | 6d7b29592aa9cac3f10823ea8f33b18893707e83 (patch) | |
tree | ed599a42e0ead9d89bf8942e0d32c976272d7036 /doc/README.developer | |
parent | 5b1d142f52ab8f89f558ab18788637d3eefdd2bb (diff) | |
download | wireshark-6d7b29592aa9cac3f10823ea8f33b18893707e83.tar.gz wireshark-6d7b29592aa9cac3f10823ea8f33b18893707e83.tar.bz2 wireshark-6d7b29592aa9cac3f10823ea8f33b18893707e83.zip |
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 <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'doc/README.developer')
-rw-r--r-- | doc/README.developer | 17 |
1 files changed, 0 insertions, 17 deletions
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: |