From 09a2365da0672be3e8401f6fcafd765b281db3ad Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Wed, 11 Aug 2010 19:24:49 -0400 Subject: [PATCH] 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 --- include/vlc_common.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/vlc_common.h b/include/vlc_common.h index 68db925230..7e16c13d69 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) -- 2.39.5