Commit 5aba4c85 authored by Philip Chimento's avatar Philip Chimento 🚮
Browse files

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.
parent 6bebb906
......@@ -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,
......
......@@ -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,
......
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment