From 6e556e0818d096befb969e5f8c49f52437a2cece Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 11 Jan 2021 13:59:40 +0100 Subject: Suppress C++ warnings in C header --- NEWS | 3 ++- src/suil_internal.h | 5 +++++ wscript | 7 ------- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index 6179785..86c0074 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,9 @@ suil (0.10.11) unstable; + * Fix some compiler warnings * Remove Qt4 support - -- David Robillard Mon, 11 Jan 2021 03:30:34 +0000 + -- David Robillard Mon, 11 Jan 2021 13:00:33 +0000 suil (0.10.10) stable; diff --git a/src/suil_internal.h b/src/suil_internal.h index 0a7ed92..ac6e563 100644 --- a/src/suil_internal.h +++ b/src/suil_internal.h @@ -34,6 +34,11 @@ #ifdef __cplusplus extern "C" { +# if defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wold-style-cast" +# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" +# endif #endif #define SUIL_ERRORF(fmt, ...) fprintf(stderr, "suil error: " fmt, __VA_ARGS__) diff --git a/wscript b/wscript index 1fbf185..e95b2dc 100644 --- a/wscript +++ b/wscript @@ -86,13 +86,6 @@ def configure(conf): ], }) - autowaf.add_compiler_flags(conf.env, 'cxx', { - 'clang': [ - '-Wno-old-style-cast', - '-Wno-zero-as-null-pointer-constant', - ], - }) - conf.env.NODELETE_FLAGS = [] if (not conf.env.MSVC_COMPILER and conf.check(linkflags = ['-Wl,-z,nodelete'], -- cgit v1.2.1