summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2018-02-07 11:23:08 +0100
committerLubomir Rintel <lkundrak@v3.sk>2018-02-07 11:46:56 +0100
commitb15a98f12632d3a3a5e68904156ff2f745d32767 (patch)
tree87a639b8e2a4d540a441e8f1544781db1b4a3664 /m4
parent28d71ad5348555f3a5a8f9424107007fff24a247 (diff)
m4: disable -Wcast-function-type
This fixes the GCC 8 build. It disables the warning conditionally so that we get the warning back if glib gets fixed.
Diffstat (limited to 'm4')
-rw-r--r--m4/compiler_options.m410
1 files changed, 10 insertions, 0 deletions
diff --git a/m4/compiler_options.m4 b/m4/compiler_options.m4
index b96e3503f..4fbeeb42b 100644
--- a/m4/compiler_options.m4
+++ b/m4/compiler_options.m4
@@ -127,6 +127,16 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
[union { int a[1]; int b[2]; } c = { 0 }]
)
+ dnl a new warning in gcc 8, glib 2.55 doesn't play nice yet
+ NM_COMPILER_WARNING([cast-function-type],
+ [#include <glib-object.h>]
+ [typedef struct { GObject parent; } NMObject;]
+ [typedef struct { GObjectClass parent; } NMObjectClass;]
+ [static void nm_object_init (NMObject *object) { } ]
+ [static void nm_object_class_init (NMObjectClass *object) { }]
+ [G_DEFINE_TYPE (NMObject, nm_object, G_TYPE_OBJECT)]
+ )
+
CFLAGS="$CFLAGS_MORE_WARNINGS $CFLAGS"
else
AC_MSG_RESULT(no)