summaryrefslogtreecommitdiff
path: root/config_host
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2013-07-23 09:49:57 +0200
committerLuboš Luňák <l.lunak@suse.cz>2013-07-23 09:52:11 +0200
commit92dfa82d2d25f2acdee0a538bf15f1fac36c0ecf (patch)
tree7054baae8356a17f7ae69ecd48cee9cd8aca4277 /config_host
parent0d2a7adf4e12b08bb6017df03e6e4ea04acc5df5 (diff)
adjust for upstreaming of warn_unused attribute
The warn_unused attribute has been upstream to GCC and Clang, so use it if present. Still warn about STL types if those do not use it yet (which is the status as of now). Change-Id: I3c003e44c08d1d141e23bba38cf92e663a5ac353
Diffstat (limited to 'config_host')
-rw-r--r--config_host/config_global.h.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/config_host/config_global.h.in b/config_host/config_global.h.in
index 9b1b12a97c63..31f64e6ed54d 100644
--- a/config_host/config_global.h.in
+++ b/config_host/config_global.h.in
@@ -23,5 +23,9 @@ Any change in this header will cause a rebuild of almost everything.
#define HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE 0
#define HAVE_THREADSAFE_STATICS 0
#define HAVE_SYSLOG_H 0
+/* Compiler supports __attribute__((warn_unused)). */
+#define HAVE_GCC_ATTRIBUTE_WARN_UNUSED 0
+/* C++ library uses __attribute__((warn_unused)) for basic types like std::string. */
+#define HAVE_GCC_ATTRIBUTE_WARN_UNUSED_STL 0
#endif