[gjs: 1/3] build: Ignore -Wcast-function-type in G_DEFINE_TYPE
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 1/3] build: Ignore -Wcast-function-type in G_DEFINE_TYPE
- Date: Mon, 5 Feb 2018 07:14:27 +0000 (UTC)
commit 5aba4c855ae7a72567ac83304e407b729f8018ca
Author: Philip Chimento <philip chimento gmail com>
Date: Sun Feb 4 15:18:49 2018 -0800
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.
gjs/context.cpp | 8 ++++++++
gjs/coverage.cpp | 7 +++++++
libgjs-private/gjs-gdbus-wrapper.cpp | 8 ++++++++
3 files changed, 23 insertions(+)
---
diff --git a/gjs/context.cpp b/gjs/context.cpp
index aa9b2a09..39850a36 100644
--- a/gjs/context.cpp
+++ b/gjs/context.cpp
@@ -116,7 +116,15 @@ struct _GjsContextClass {
GObjectClass parent;
};
+/* Temporary workaround for https://bugzilla.gnome.org/show_bug.cgi?id=793175 */
+#if __GNUC__ >= 8
+_Pragma("GCC diagnostic push")
+_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
+#endif
G_DEFINE_TYPE(GjsContext, gjs_context, G_TYPE_OBJECT);
+#if __GNUC__ >= 8
+_Pragma("GCC diagnostic pop")
+#endif
enum {
PROP_0,
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,
diff --git a/libgjs-private/gjs-gdbus-wrapper.cpp b/libgjs-private/gjs-gdbus-wrapper.cpp
index a28b9b76..758c5b49 100644
--- a/libgjs-private/gjs-gdbus-wrapper.cpp
+++ b/libgjs-private/gjs-gdbus-wrapper.cpp
@@ -30,7 +30,15 @@ struct _GjsDBusImplementationPrivate {
guint idle_id;
};
+/* Temporary workaround for https://bugzilla.gnome.org/show_bug.cgi?id=793175 */
+#if __GNUC__ >= 8
+_Pragma("GCC diagnostic push")
+_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
+#endif
G_DEFINE_TYPE(GjsDBusImplementation, gjs_dbus_implementation, G_TYPE_DBUS_INTERFACE_SKELETON)
+#if __GNUC__ >= 8
+_Pragma("GCC diagnostic pop")
+#endif
static void
gjs_dbus_implementation_method_call(GDBusConnection *connection,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]