From bcad5ddd38c5184910844d718ca3bb4bae50c47d Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 11 Mar 2017 22:08:31 +0200 Subject: Only enable -Wmissing-field-initializers for Clang The following pragma is Clang specific: It produces a warning: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] Only enable it for Clang by checking the __clang__ macro. Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- core/save-xml.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/save-xml.c') diff --git a/core/save-xml.c b/core/save-xml.c index c9b6a5b99..b6a0e4b81 100644 --- a/core/save-xml.c +++ b/core/save-xml.c @@ -1,5 +1,7 @@ +#ifdef __clang__ // Clang has a bug on zero-initialization of C structs. #pragma clang diagnostic ignored "-Wmissing-field-initializers" +#endif #include #include -- cgit v1.2.3-70-g09d2