Add ATTRIBUTE_UNUSED_RESULT to macro_buffer
authorTom Tromey <tromey@adacore.com>
Tue, 26 Feb 2019 21:52:05 +0000 (14:52 -0700)
committerTom Tromey <tromey@adacore.com>
Tue, 5 Mar 2019 15:48:40 +0000 (08:48 -0700)
This applies ATTRIBUTE_UNUSED_RESULT to macro_buffer::release.

gdb/ChangeLog
2019-03-05  Tom Tromey  <tromey@adacore.com>

* macroexp.c (struct macro_buffer) <release>: Add
ATTRIBUTE_UNUSED_RESULT.

gdb/ChangeLog
gdb/macroexp.c

index a420e2a..f26c943 100644 (file)
@@ -1,5 +1,10 @@
 2019-03-05  Tom Tromey  <tromey@adacore.com>
 
+       * macroexp.c (struct macro_buffer) <release>: Add
+       ATTRIBUTE_UNUSED_RESULT.
+
+2019-03-05  Tom Tromey  <tromey@adacore.com>
+
        * nat/linux-btrace.c (linux_enable_bts, linux_enable_pt): Update.
        * common/scoped_mmap.h (class scoped_mmap) <release>: Add
        ATTRIBUTE_UNUSED_RESULT.
index 0e8e85c..a588cc8 100644 (file)
@@ -130,7 +130,7 @@ struct macro_buffer
 
   /* Release the text of the buffer to the caller, which is now
      responsible for freeing it.  */
-  char *release ()
+  ATTRIBUTE_UNUSED_RESULT char *release ()
   {
     gdb_assert (! shared);
     gdb_assert (size);