summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-01-11 13:59:40 +0100
committerDavid Robillard <d@drobilla.net>2021-01-11 14:01:49 +0100
commit6e556e0818d096befb969e5f8c49f52437a2cece (patch)
tree9b21104621de096b2b731502da8404db74c4a9f6
parent335c96ccb66d62024fe14c7eacfc6f1c84153a85 (diff)
downloadsuil-master.tar.gz
suil-master.tar.bz2
suil-master.zip
Suppress C++ warnings in C headerHEADmaster
-rw-r--r--NEWS3
-rw-r--r--src/suil_internal.h5
-rw-r--r--wscript7
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 <d@drobilla.net> Mon, 11 Jan 2021 03:30:34 +0000
+ -- David Robillard <d@drobilla.net> 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'],