This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug build/10675] cli-cmds.c:323: error: ignoring return value of ‘getcwd’, declared with attribute warn_unused_result
- From: "info at skierpage dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 21 Sep 2009 10:47:18 -0000
- Subject: [Bug build/10675] cli-cmds.c:323: error: ignoring return value of ‘getcwd’, declared with attribute warn_unused_result
- References: <20090921004905.10675.info@skierpage.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From info at skierpage dot com 2009-09-21 10:47 -------
I'm also getting this compiler warning/error in other places:
mi/mi-cmd-env.c:81: error: ignoring return value of ?getcwd?, declared with
attribute warn_unused_result
gdb/main.c: In function ?captured_main?:
gdb/main.c:191: error: ignoring return value of ?getcwd?, declared with
attribute warn_unused_result
gdb/top.c: In function ?gdb_init?:
gdb/top.c:1631: error: ignoring return value of ?getcwd?, declared with
attribute warn_unused_result
gdb/utils.c: In function ?internal_vproblem?:
gdb/utils.c:707: error: ignoring return value of ?write?, declared with
attribute warn_unused_result
gdb/inflow.c: In function ?new_tty?:
gdb/inflow.c:548: error: ignoring return value of ?dup?, declared with attribute
warn_unused_result
gdb/inflow.c:553: error: ignoring return value of ?dup?, declared with attribute
warn_unused_result
gdb/inflow.c:558: error: ignoring return value of ?dup?, declared with attribute
warn_unused_result
FWIW, to blow past these compile errors I've surrounded the offending line with
something like:
char *junk;
junk = [offending line]
I haven't done anything to enforce such strict compiling, just configure and make.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10675
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.