From 9ee4c01788073b3f061b84c0df966dd334cf0ca2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 7 Jan 2005 19:42:24 +0000 Subject: 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 . --- misc/sys/cdefs.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'misc') 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 -- cgit v1.2.3