summaryrefslogtreecommitdiffstats
path: root/core/load-git.c
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-03-11 22:08:31 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-03-12 09:18:59 -0700
commitbcad5ddd38c5184910844d718ca3bb4bae50c47d (patch)
tree562f38156218e14064b81c9c37870ed476c96d7e /core/load-git.c
parentf47dc5c72090a3a94c688be7de0be8ab4c277750 (diff)
downloadsubsurface-bcad5ddd38c5184910844d718ca3bb4bae50c47d.tar.gz
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 <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/load-git.c')
-rw-r--r--core/load-git.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/load-git.c b/core/load-git.c
index 03e7f8694..fdac2ef8c 100644
--- a/core/load-git.c
+++ b/core/load-git.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 <stdio.h>
#include <ctype.h>