[PATCH 0/7] Use warn_unused_result on release methods

John Baldwin jhb@FreeBSD.org
Wed Feb 27 22:26:00 GMT 2019


On 2/27/19 2:18 PM, Tom Tromey wrote:
> This applies the warn_unused_result attribute to various "release"
> methods in gdb.  The idea here is to avoid the bug where "release" is
> used when "reset (nullptr)" is meant.
> 
> This caught one bug, so I consider it a success.  Perhaps the new
> attribute can be used elsewhere as well.
> 
> Tested by the buildbot.
> Let me know what you think.

Looks good to me.

-- 
John Baldwin



More information about the Gdb-patches mailing list