From 3cabd438f3d18e1cb7afd4d2a82449883943e62f Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 26 Feb 2019 14:44:29 -0700 Subject: [PATCH] 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. --- gdb/ChangeLog | 5 +++++ gdb/common/scoped_fd.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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; -- 2.30.2