summary refs log tree commit diff
path: root/misc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-01-07 19:42:24 +0000
committerUlrich Drepper <drepper@redhat.com>2005-01-07 19:42:24 +0000
commit9ee4c01788073b3f061b84c0df966dd334cf0ca2 (patch)
treebe4cf37218adccf6dc4b44f1170ba68ff1f7b269 /misc
parente2070ca2b40d3c2dd20d110268ce7b4007a17f4f (diff)
downloadglibc-9ee4c01788073b3f061b84c0df966dd334cf0ca2.tar.gz
glibc-9ee4c01788073b3f061b84c0df966dd334cf0ca2.tar.xz
glibc-9ee4c01788073b3f061b84c0df966dd334cf0ca2.zip
Update.
	* misc/sys/cdefs.h (__attribute_warn_unused_result__): Define.
	* stdlib/stdlib.h: Make realloc with
	__attribute_warn_unused_result__ instead of __wur.
	* malloc/malloc.h: Add __wur and __attribute_warn_unused_result__
	markers as in <stdlib.h>.
Diffstat (limited to 'misc')
-rw-r--r--misc/sys/cdefs.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index 6ac21013cc..8d529bfadc 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2001, 2002, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2001, 2002, 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -257,9 +257,16 @@
 
 /* If fortification mode, we warn about unused results of certain
    function calls which can lead to problems.  */
-#if __GNUC_PREREQ (3,4) && __USE_FORTIFY_LEVEL > 0
-# define __wur __attribute__ ((__warn_unused_result__))
+#if __GNUC_PREREQ (3,4)
+# define __attribute_warn_unused_result__ \
+   __attribute__ ((__warn_unused_result__))
+# if __USE_FORTIFY_LEVEL > 0
+#  define __wur __attribute_warn_unused_result__
+# endif
 #else
+# define __attribute_warn_unused_result__ /* empty */
+#endif
+#ifndef __wur
 # define __wur /* Ignore */
 #endif