[binutils-gdb] Add ATTRIBUTE_UNUSED_RESULT to scoped_remote_fd::release

Tom Tromey tromey@sourceware.org
Tue Mar 5 15:49:00 GMT 2019


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=88a774b9984e42c492ddcf4e4b4b0170ac803576

commit 88a774b9984e42c492ddcf4e4b4b0170ac803576
Author: Tom Tromey <tromey@adacore.com>
Date:   Tue Feb 26 14:52:47 2019 -0700

    Add ATTRIBUTE_UNUSED_RESULT to scoped_remote_fd::release
    
    This applies ATTRIBUTE_UNUSED_RESULT to scoped_remote_fd::release.
    
    gdb/ChangeLog
    2019-03-05  Tom Tromey  <tromey@adacore.com>
    
    	* remote.c (class scoped_remote_fd) <release>: Add
    	ATTRIBUTE_UNUSED_RESULT.

Diff:
---
 gdb/ChangeLog | 5 +++++
 gdb/remote.c  | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f26c943..6ed91e2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2019-03-05  Tom Tromey  <tromey@adacore.com>
 
+	* remote.c (class scoped_remote_fd) <release>: Add
+	ATTRIBUTE_UNUSED_RESULT.
+
+2019-03-05  Tom Tromey  <tromey@adacore.com>
+
 	* macroexp.c (struct macro_buffer) <release>: Add
 	ATTRIBUTE_UNUSED_RESULT.
 
diff --git a/gdb/remote.c b/gdb/remote.c
index 36136e3..c98c5cb 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -12410,7 +12410,7 @@ public:
   DISABLE_COPY_AND_ASSIGN (scoped_remote_fd);
 
   /* Release ownership of the file descriptor, and return it.  */
-  int release () noexcept
+  ATTRIBUTE_UNUSED_RESULT int release () noexcept
   {
     int fd = m_fd;
     m_fd = -1;



More information about the Gdb-cvs mailing list