summaryrefslogtreecommitdiffstats
path: root/core/datatrak.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/datatrak.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/datatrak.c')
-rw-r--r--core/datatrak.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/datatrak.c b/core/datatrak.c
index 6c9b00764..272aa3424 100644
--- a/core/datatrak.c
+++ b/core/datatrak.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 <stdlib.h>
#include <stdio.h>