[gjs] build: Hide Clang-only pragmas from GCC
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] build: Hide Clang-only pragmas from GCC
- Date: Wed, 28 Dec 2016 01:30:27 +0000 (UTC)
commit 689b881407c70adbad8cf28ad555f71b48ca687b
Author: Philip Chimento <philip endlessm com>
Date: Tue Dec 20 18:21:03 2016 -0800
build: Hide Clang-only pragmas from GCC
These warnings aren't generated on GCC, so ignoring them produces a
warning. Therefore we should only ignore them when compiling with Clang.
(Unreviewed, fixes -Werror build.)
gjs/jsapi-constructor-proxy.cpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gjs/jsapi-constructor-proxy.cpp b/gjs/jsapi-constructor-proxy.cpp
index 363a418..d0a795d 100644
--- a/gjs/jsapi-constructor-proxy.cpp
+++ b/gjs/jsapi-constructor-proxy.cpp
@@ -31,8 +31,10 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
-#pragma GCC diagnostic ignored "-Wmismatched-tags"
-#pragma GCC diagnostic ignored "-Winconsistent-missing-override"
+#ifdef __clang__
+#pragma clang diagnostic ignored "-Wmismatched-tags"
+#pragma clang diagnostic ignored "-Winconsistent-missing-override"
+#endif /* __clang__ */
#include "jsproxy.h"
#pragma GCC diagnostic pop
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]