[libbluray-devel] Add BD_USED attribute (unchecked function return value)

hpi1 git at videolan.org
Mon Aug 8 18:46:38 CEST 2016


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sun Aug  7 14:00:15 2016 +0300| [ee3a2b3edcfda7b33b37d05c510f5b4df41a7a5d] | committer: hpi1

Add BD_USED attribute (unchecked function return value)

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=ee3a2b3edcfda7b33b37d05c510f5b4df41a7a5d
---

 src/util/attributes.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/util/attributes.h b/src/util/attributes.h
index 9aa84d8..1cc611c 100644
--- a/src/util/attributes.h
+++ b/src/util/attributes.h
@@ -58,4 +58,10 @@
 #  define BD_UNLIKELY(x) __builtin_expect((x),0)
 #endif
 
+#if defined(__GNUC__) && __GNUC__ > 3
+#  define BD_USED  __attribute__((warn_unused_result))
+#else
+#  define BD_USED
+#endif
+
 #endif /* LIBBLURAY_ATTRIBUTES_H_ */



More information about the libbluray-devel mailing list