Add ATTRIBUTE_UNUSED_RESULT to ref_ptr::release
authorTom Tromey <tromey@adacore.com>
Tue, 26 Feb 2019 21:59:47 +0000 (14:59 -0700)
committerTom Tromey <tromey@adacore.com>
Tue, 5 Mar 2019 15:48:40 +0000 (08:48 -0700)
commit895dafa679db7af79576dcd177a6d91d65657ee8
treeff0395477787a0b1b5f432866f3428e9edbf40e5
parent88a774b9984e42c492ddcf4e4b4b0170ac803576
Add ATTRIBUTE_UNUSED_RESULT to ref_ptr::release

This applies ATTRIBUTE_UNUSED_RESULT to ref_ptr::release and updates a
few spots to comply.  I believe one use in install_default_visualizer
was in error, fixed by this patch.

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

* varobj.c (update_dynamic_varobj_children): Update.
(install_default_visualizer): Use reset, not release.
* value.c (set_internalvar): Update.
* dwarf2loc.c (value_of_dwarf_reg_entry): Update.
* common/gdb_ref_ptr.h (class ref_ptr) <release>: Add
ATTRIBUTE_UNUSED_RESULT.
gdb/ChangeLog
gdb/common/gdb_ref_ptr.h
gdb/dwarf2loc.c
gdb/value.c
gdb/varobj.c