summaryrefslogtreecommitdiffstats
path: root/core
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
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')
-rw-r--r--core/cochran.c2
-rw-r--r--core/datatrak.c2
-rw-r--r--core/equipment.c2
-rw-r--r--core/git-access.c2
-rw-r--r--core/libdivecomputer.c2
-rw-r--r--core/load-git.c2
-rw-r--r--core/membuffer.c2
-rw-r--r--core/parse-xml.c2
-rw-r--r--core/save-git.c2
-rw-r--r--core/save-html.c2
-rw-r--r--core/save-xml.c2
-rw-r--r--core/worldmap-save.c2
12 files changed, 24 insertions, 0 deletions
diff --git a/core/cochran.c b/core/cochran.c
index c31e78f79..430c3b48a 100644
--- a/core/cochran.c
+++ b/core/cochran.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>
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>
diff --git a/core/equipment.c b/core/equipment.c
index 0d4ab5571..19b50ab69 100644
--- a/core/equipment.c
+++ b/core/equipment.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
/* equipment.c */
#include <stdio.h>
diff --git a/core/git-access.c b/core/git-access.c
index b95606d86..ac4ac80af 100644
--- a/core/git-access.c
+++ b/core/git-access.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>
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c
index 8ffb49d43..f8f9823c2 100644
--- a/core/libdivecomputer.c
+++ b/core/libdivecomputer.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 <unistd.h>
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>
diff --git a/core/membuffer.c b/core/membuffer.c
index 053edb8f0..e35f160b2 100644
--- a/core/membuffer.c
+++ b/core/membuffer.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 <stdarg.h>
#include <stdlib.h>
diff --git a/core/parse-xml.c b/core/parse-xml.c
index 38cd25f05..2f5be06bc 100644
--- a/core/parse-xml.c
+++ b/core/parse-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 <stdio.h>
#include <ctype.h>
diff --git a/core/save-git.c b/core/save-git.c
index d0ae790fa..cfcd3627c 100644
--- a/core/save-git.c
+++ b/core/save-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>
diff --git a/core/save-html.c b/core/save-html.c
index 0b2d8e79a..2824625ef 100644
--- a/core/save-html.c
+++ b/core/save-html.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 "save-html.h"
#include "qthelperfromc.h"
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 <stdio.h>
#include <ctype.h>
diff --git a/core/worldmap-save.c b/core/worldmap-save.c
index e7e8bcc30..8ad6535ba 100644
--- a/core/worldmap-save.c
+++ b/core/worldmap-save.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 <stdarg.h>
#include <stdlib.h>