mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-12 03:43:33 +08:00
Introduce ATTRIBUTE_UNUSED_RESULT and use it
This introduces the new ATTRIBUTE_UNUSED_RESULT define, and applies it to gdb_argv::release. gdb/ChangeLog 2019-03-05 Tom Tromey <tromey@adacore.com> * utils.h (class gdb_argv) <release>: Add ATTRIBUTE_UNUSED_RESULT. * common/common-defs.h (ATTRIBUTE_UNUSED_RESULT): Define.
This commit is contained in:
parent
093f70ccd3
commit
18cb7c9f3a
@ -1,3 +1,9 @@
|
||||
2019-03-05 Tom Tromey <tromey@adacore.com>
|
||||
|
||||
* utils.h (class gdb_argv) <release>: Add
|
||||
ATTRIBUTE_UNUSED_RESULT.
|
||||
* common/common-defs.h (ATTRIBUTE_UNUSED_RESULT): Define.
|
||||
|
||||
2019-03-02 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* xml-syscall.c (xml_list_syscalls_by_group): Drop 'struct' from
|
||||
|
@ -93,6 +93,12 @@
|
||||
#undef ATTRIBUTE_PRINTF
|
||||
#define ATTRIBUTE_PRINTF _GL_ATTRIBUTE_FORMAT_PRINTF
|
||||
|
||||
#if GCC_VERSION >= 3004
|
||||
#define ATTRIBUTE_UNUSED_RESULT __attribute__ ((__warn_unused_result__))
|
||||
#else
|
||||
#define ATTRIBUTE_UNUSED_RESULT
|
||||
#endif
|
||||
|
||||
#include "libiberty.h"
|
||||
#include "pathmax.h"
|
||||
#include "gdb/signals.h"
|
||||
|
@ -188,7 +188,7 @@ public:
|
||||
/* Return the underlying array, transferring ownership to the
|
||||
caller. */
|
||||
|
||||
char **release ()
|
||||
ATTRIBUTE_UNUSED_RESULT char **release ()
|
||||
{
|
||||
char **result = m_argv;
|
||||
m_argv = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user