From: Brad Smith Date: Wed, 11 Aug 2010 23:24:49 +0000 (-0400) Subject: Only define LIBVLC_USED for GCC 3.4 or newer. GCC 3.3 does not support the warn_unuse... X-Git-Tag: 1.2.0-pre1~5446 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=09a2365da0672be3e8401f6fcafd765b281db3ad;p=vlc 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 --- 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)