This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Commit "Introduce ATTRIBUTE_UNUSED_RESULT and use it" breaks gdb build
- From: John Darrington <john at darrington dot wattle dot id dot au>
- To: gdb-patches at sourceware dot org
- Cc: tromey at adacore dot com
- Date: Wed, 6 Mar 2019 08:49:24 +0100
- Subject: Commit "Introduce ATTRIBUTE_UNUSED_RESULT and use it" breaks gdb build
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'