Add warn_unused_result attribute for memory-related functions in libiberty.
authorMartin Liska <mliska@suse.cz>
Mon, 10 Jun 2019 07:42:43 +0000 (09:42 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Mon, 10 Jun 2019 07:42:43 +0000 (07:42 +0000)
commitde1ee900b045061cdc590fbbf47b46b64d296f04
treee8d8028182dfcf97662fa924b29abdf06b8a3c6a
parent3bb0dcb6c02661bed2f8dd00052145fde3bbdecc
Add warn_unused_result attribute for memory-related functions in libiberty.

2019-06-10  Martin Liska  <mliska@suse.cz>

* ansidecl.h (ATTRIBUTE_WARN_UNUSED_RESULT): New macro.
* libiberty.h (xmalloc): Use it.
(xrealloc): Likewise.
(xcalloc): Likewise.
(xstrdup): Likewise.
(xstrndup): Likewise.
(xmemdup): Likewise.

From-SVN: r272110
include/ChangeLog
include/ansidecl.h
include/libiberty.h