Commit "Introduce ATTRIBUTE_UNUSED_RESULT and use it" breaks gdb build

John Darrington
2019-03-06T07:49:34Z

This change:

commit 18cb7c9f3add62ff598f0551a767af8aaa04b07e
Author: Tom Tromey <tromey@adacore.com>
Date: Tue Feb 26 14:39:01 2019 -0700

Introduce ATTRIBUTE_UNUSED_RESULT and use it

This introduces the new ATTRIBUTE_UNUSED_RESULT define, and applies it
to gdb_argv::release.

Seems to cause gdb to not compile, when built with default flags.

CXX remote-sim.o
/home/john/binutils-gdb/gdb/remote-sim.c: In function 'void gdbsim_target_open(const char*, int)':
/home/john/binutils-gdb/gdb/remote-sim.c:765:18: error: ignoring return value of 'char** gdb_argv::release()', declared with attribute warn_unused_result [-Werror=unused-result]
argv.release ();
^

cc1plus: all warnings being treated as errors
Makefile:1637: recipe for target 'remote-sim.o' failed

J'