[vlc-commits] commit: Only define LIBVLC_USED for GCC 3.4 or newer. GCC 3. 3 does not support the warn_unused_result attribute. (Brad Smith )

git at videolan.org git at videolan.org
Thu Aug 12 12:05:10 CEST 2010


vlc | branch: master | Brad Smith <brad at comstyle.com> | Wed Aug 11 19:24:49 2010 -0400| [09a2365da0672be3e8401f6fcafd765b281db3ad] | committer: Jean-Baptiste Kempf 

Only define LIBVLC_USED for GCC 3.4 or newer. GCC 3.3 does not support the warn_unused_result attribute.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=09a2365da0672be3e8401f6fcafd765b281db3ad
---

 include/vlc_common.h |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/include/vlc_common.h b/include/vlc_common.h
index 68db925..7e16c13 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -80,7 +80,11 @@
 #     define LIBVLC_FORMAT(x,y) __attribute__ ((format(printf,x,y)))
 #   endif
 #   define LIBVLC_FORMAT_ARG(x) __attribute__ ((format_arg(x)))
-#   define LIBVLC_USED __attribute__ ((warn_unused_result))
+#   if __GNUC__ > 3 || (__GNUC__ == 3 && (__GNUC_MINOR__ >= 4))
+#     define LIBVLC_USED __attribute__ ((warn_unused_result))
+#   else
+#     define LIBVLC_USED
+#   endif
 #   define LIBVLC_MALLOC __attribute__ ((malloc))
 #else
 #   define LIBVLC_FORMAT(x,y)



More information about the vlc-commits mailing list