This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Replace __attribute((__warning__())) by __attribute__((deprecated()))


On 11/05/2015 02:51 PM, Olivier Martin wrote:
> Clang raises the warning message:
> warning: unknown attribute '__warning__' ignored [-Wunknown-attributes]
> 
> Signed-off-by: Olivier Martin <olivier@labapart.com>
> ---
>  newlib/libc/include/stdlib.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/newlib/libc/include/stdlib.h b/newlib/libc/include/stdlib.h
> index 51a6f0a..fe8a598 100644
> --- a/newlib/libc/include/stdlib.h
> +++ b/newlib/libc/include/stdlib.h
> @@ -112,14 +112,14 @@ int	_EXFUN(mkostemp,(char *, int));
>  int	_EXFUN(mkostemps,(char *, int, int));
>  int	_EXFUN(mkstemp,(char *));
>  int	_EXFUN(mkstemps,(char *, int));
> -char *	_EXFUN(mktemp,(char *) _ATTRIBUTE ((__warning__ ("the use of `mktemp' is dangerous; use `mkstemp' instead"))));
> +char *	_EXFUN(mktemp,(char *) _ATTRIBUTE ((deprecated("the use of `mktemp' is dangerous; use `mkstemp' instead"))));

Please spell it __deprecated__, since this is in a header, and we can't
stomp on the user's namespace.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]