[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
Mon Aug 16 23:59:38 CEST 2010


vlc/vlc-1.1 | branch: master | Brad Smith <brad at comstyle.com> | Wed Aug 11 19:24:49 2010 -0400| [fedd27d44332c4540a7289dc6eb304276610ff72] | 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>
(cherry picked from commit 09a2365da0672be3e8401f6fcafd765b281db3ad)

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

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

 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 01a5acb..6855d33 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