summaryrefslogtreecommitdiff
path: root/gjs/coverage.cpp
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2018-02-04 15:18:49 -0800
committerPhilip Chimento <philip.chimento@gmail.com>2018-02-04 15:18:49 -0800
commit5aba4c855ae7a72567ac83304e407b729f8018ca (patch)
treec466201e83d5072a7177f1783d69f8601b801279 /gjs/coverage.cpp
parent6bebb906b4cb902104aa5125adc6329e4a17ed07 (diff)
downloadgjs-5aba4c855ae7a72567ac83304e407b729f8018ca.tar.gz
build: Ignore -Wcast-function-type in G_DEFINE_TYPE
Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=793175 This ignores the warning for G++ 8 and later (which is apparently when it was added.) Closes #117.
Diffstat (limited to 'gjs/coverage.cpp')
-rw-r--r--gjs/coverage.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/gjs/coverage.cpp b/gjs/coverage.cpp
index c9461c70..539a0ea4 100644
--- a/gjs/coverage.cpp
+++ b/gjs/coverage.cpp
@@ -46,9 +46,16 @@ typedef struct {
GFile *output_dir;
} GjsCoveragePrivate;
+#if __GNUC__ >= 8
+_Pragma("GCC diagnostic push")
+_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
+#endif
G_DEFINE_TYPE_WITH_PRIVATE(GjsCoverage,
gjs_coverage,
G_TYPE_OBJECT)
+#if __GNUC__ >= 8
+_Pragma("GCC diagnostic pop")
+#endif
enum {
PROP_0,