changeset 5190:6d103b3b3cc5 HEAD

warn_unused_result attribute exists only with gcc 4.0 and later.
author Timo Sirainen <tss@iki.fi>
date Thu, 22 Feb 2007 17:59:54 +0200
parents 7ec060a7c29f
children ee745eee4d9c
files src/lib/macros.h
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/macros.h	Thu Feb 22 17:42:44 2007 +0200
+++ b/src/lib/macros.h	Thu Feb 22 17:59:54 2007 +0200
@@ -104,11 +104,12 @@
 #  define __attr_noreturn__ __attribute__((noreturn))
 #  define __attr_const__ __attribute__((const))
 #  define __attr_malloc__ __attribute__((malloc))
-#  define __attr_warn_unused_result__ __attribute__((warn_unused_result))
 #  if __GNUC__ > 3
 /* GCC 4.0 and later */
+#    define __attr_warn_unused_result__ __attribute__((warn_unused_result))
 #    define __attr_sentinel__ __attribute__((sentinel))
 #  else
+#    define __attr_warn_unused_result__
 #    define __attr_sentinel__
 #  endif
 #else