Add ATTRIBUTE_UNUSED_RESULT to scoped_fd
This applies ATTRIBUTE_UNUSED_RESULT to scoped_fd::release. gdb/ChangeLog 2019-03-05 Tom Tromey <tromey@adacore.com> * common/scoped_fd.h (class scoped_fd) <release>: Add ATTRIBUTE_UNUSED_RESULT.
This commit is contained in:
parent
41e3300aa7
commit
3cabd438f3
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2019-03-05 Tom Tromey <tromey@adacore.com>
|
||||
|
||||
* common/scoped_fd.h (class scoped_fd) <release>: Add
|
||||
ATTRIBUTE_UNUSED_RESULT.
|
||||
|
||||
2019-03-05 Tom Tromey <tromey@adacore.com>
|
||||
|
||||
* parser-defs.h (struct parser_state) <release>: Add
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
|
||||
DISABLE_COPY_AND_ASSIGN (scoped_fd);
|
||||
|
||||
int release () noexcept
|
||||
ATTRIBUTE_UNUSED_RESULT int release () noexcept
|
||||
{
|
||||
int fd = m_fd;
|
||||
m_fd = -1;
|
||||
|
|
Loading…
Add table
Reference in a new issue