summaryrefslogtreecommitdiff
path: root/include/asterisk/compiler.h
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2008-06-19 17:55:34 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2008-06-19 17:55:34 +0000
commit4522c60ec8ad8aaba86db803f9afd74b6851b346 (patch)
treef91de7248a352ef848d455669b556c6580848a79 /include/asterisk/compiler.h
parent5791b6680ded584a4d1f5b0f370446630a8eb77e (diff)
Detect if the installed gcc version supports the warn_unused_result attribute.
Reported by mvanbaak via IRC -dev. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/compiler.h')
-rw-r--r--include/asterisk/compiler.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asterisk/compiler.h b/include/asterisk/compiler.h
index 12b8ee728..b6575d000 100644
--- a/include/asterisk/compiler.h
+++ b/include/asterisk/compiler.h
@@ -59,4 +59,10 @@
#define attribute_sentinel
#endif
+#ifdef HAVE_ATTRIBUTE_warn_unused_result
+#define attribute_warn_unused_result __attribute__((warn_unused_result))
+#else
+#define attribute_warn_unused_result
+#endif
+
#endif /* _ASTERISK_COMPILER_H */