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

Eric Blake eblake@redhat.com
Thu Nov 5 22:20:00 GMT 2015


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/newlib/attachments/20151105/15da8a39/attachment.sig>


More information about the Newlib mailing list