diff options
author | Peter Wu <peter@lekensteyn.nl> | 2018-11-18 01:44:16 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-11-20 05:10:48 +0000 |
commit | ad21e3121f3307ee6cc2b4a2b296ef6dd83152ed (patch) | |
tree | e8afc291783a80c6cbb7ff41e9164db48d629e7d /wiretap/merge.c | |
parent | 22db1f066fb38de335d77372986363e829229ac4 (diff) |
CMake: disable -Wmissing-field-initializers for broken compilers
AppleClang 9.1.0.9020039 is complaining about a "missing initializer" in
dumpcap.c. Rather than doing ugly things like one of the following:
struct s x;
memset(&x, 0, sizeof(x));
struct s y = {.field=0};
just disable the warning (enabled via -Wextra) on broken compilers. The
minimum versions were determined using https://gcc.godbolt.org/
The special "universal zero initializer { 0 }" exception is explicitly
documented in the GCC manual (as shipped with GCC 8.2.1). Clang 6 does
not document it, but r314499 (as included with Clang 6) does implement
it and adds tests for it. (Xcode 10.0 seems based on Clang 6.0.1.)
Change-Id: I8e48d8c424a512ca36ef8c4f832ce81b3675232c
Reviewed-on: https://code.wireshark.org/review/30684
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'wiretap/merge.c')
0 files changed, 0 insertions, 0 deletions