This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 3/7] Add ATTRIBUTE_UNUSED_RESULT to scoped_fd
- From: Tom Tromey <tromey at adacore dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at adacore dot com>
- Date: Wed, 27 Feb 2019 15:18:10 -0700
- Subject: [PATCH 3/7] Add ATTRIBUTE_UNUSED_RESULT to scoped_fd
- References: <20190227221814.17661-1-tromey@adacore.com>
This applies ATTRIBUTE_UNUSED_RESULT to scoped_fd::release.
2019-02-27 Tom Tromey <tromey@adacore.com>
* common/scoped_fd.h (class scoped_fd) <release>: Add
ATTRIBUTE_UNUSED_RESULT.
---
gdb/ChangeLog | 5 +++++
gdb/common/scoped_fd.h | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
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.20.1