Add ATTRIBUTE_UNUSED_RESULT to scoped_fd
authorTom Tromey <tromey@adacore.com>
Tue, 26 Feb 2019 21:44:29 +0000 (14:44 -0700)
committerTom Tromey <tromey@adacore.com>
Tue, 5 Mar 2019 15:48:40 +0000 (08:48 -0700)
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.

gdb/ChangeLog
gdb/common/scoped_fd.h

index f59292fb355642be45aac673fb048b20521200b4..74b336749c5a7db79cfb29d58b2c46efc7070426 100644 (file)
@@ -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
index bdd22f595a5807f29f85a0734ede483cd0398cc8..c4a494b7018a9fdf5953437c0bcbda3b4e304f1c 100644 (file)
@@ -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;