From: Tom Tromey Date: Tue, 26 Feb 2019 21:44:29 +0000 (-0700) Subject: Add ATTRIBUTE_UNUSED_RESULT to scoped_fd X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3cabd438f3d18e1cb7afd4d2a82449883943e62f;p=binutils-gdb.git Add ATTRIBUTE_UNUSED_RESULT to scoped_fd This applies ATTRIBUTE_UNUSED_RESULT to scoped_fd::release. gdb/ChangeLog 2019-03-05 Tom Tromey * common/scoped_fd.h (class scoped_fd) : Add ATTRIBUTE_UNUSED_RESULT. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f59292fb355..74b336749c5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-03-05 Tom Tromey + + * common/scoped_fd.h (class scoped_fd) : Add + ATTRIBUTE_UNUSED_RESULT. + 2019-03-05 Tom Tromey * parser-defs.h (struct parser_state) : Add diff --git a/gdb/common/scoped_fd.h b/gdb/common/scoped_fd.h index bdd22f595a5..c4a494b7018 100644 --- a/gdb/common/scoped_fd.h +++ b/gdb/common/scoped_fd.h @@ -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;