public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/10675] New: cli-cmds.c:323: error: ignoring return value of getcwd, declared with attribute warn_unused_result
@ 2009-09-21 0:49 info at skierpage dot com
2009-09-21 10:47 ` [Bug build/10675] " info at skierpage dot com
2010-02-23 21:03 ` tromey at redhat dot com
0 siblings, 2 replies; 3+ messages in thread
From: info at skierpage dot com @ 2009-09-21 0:49 UTC (permalink / raw)
To: gdb-prs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2009 bytes --]
On Kubuntu 9.04 amd64 "Jaunty" after executing path/to/gdb/configure then make,
(and hacking to avoid a similar compiler error bug 10674 ), I get:
gcc -c -g -O2 -I. -I/home/skierpage/programs/gdb-6.8/gdb
-I/home/skierpage/programs/gdb-6.8/gdb/config
-DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H
-I/home/skierpage/programs/gdb-6.8/gdb/../include/opcode
-I/home/skierpage/programs/gdb-6.8/gdb/../readline/.. -I../bfd
-I/home/skierpage/programs/gdb-6.8/gdb/../bfd
-I/home/skierpage/programs/gdb-6.8/gdb/../include -I../libdecnumber
-I/home/skierpage/programs/gdb-6.8/gdb/../libdecnumber -DMI_OUT=1 -DTUI=1
-Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral
-Wno-pointer-sign -Wno-unused -Wno-switch -Wno-char-subscripts -Werror
/home/skierpage/programs/gdb-6.8/gdb/cli/cli-cmds.c
cc1: warnings being treated as errors
/home/skierpage/programs/gdb-6.8/gdb/cli/cli-cmds.c: In function pwd_command:
/home/skierpage/programs/gdb-6.8/gdb/cli/cli-cmds.c:323: error: ignoring return
value of getcwd, declared with attribute warn_unused_result
make[2]: *** [cli-cmds.o] Error 1
make[2]: Leaving directory `/home/skierpage/programs/gdb-6.8/build/gdb'
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory `/home/skierpage/programs/gdb-6.8/build'
make: *** [all] Error 2
The offending line is
getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
--
Summary: cli-cmds.c:323: error: ignoring return value of
getcwd, declared with attribute warn_unused_result
Product: gdb
Version: 6.8
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: build
AssignedTo: unassigned at sourceware dot org
ReportedBy: info at skierpage dot com
CC: gdb-prs at sourceware dot org
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug build/10675] cli-cmds.c:323: error: ignoring return value of getcwd, declared with attribute warn_unused_result
2009-09-21 0:49 [Bug build/10675] New: cli-cmds.c:323: error: ignoring return value of getcwd, declared with attribute warn_unused_result info at skierpage dot com
@ 2009-09-21 10:47 ` info at skierpage dot com
2010-02-23 21:03 ` tromey at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: info at skierpage dot com @ 2009-09-21 10:47 UTC (permalink / raw)
To: gdb-prs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1446 bytes --]
------- 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug build/10675] cli-cmds.c:323: error: ignoring return value of getcwd, declared with attribute warn_unused_result
2009-09-21 0:49 [Bug build/10675] New: cli-cmds.c:323: error: ignoring return value of getcwd, declared with attribute warn_unused_result info at skierpage dot com
2009-09-21 10:47 ` [Bug build/10675] " info at skierpage dot com
@ 2010-02-23 21:03 ` tromey at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: tromey at redhat dot com @ 2010-02-23 21:03 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From tromey at redhat dot com 2010-02-23 21:03 -------
This was fixed a while ago.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|6.8 |7.0
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-02-23 21:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-21 0:49 [Bug build/10675] New: cli-cmds.c:323: error: ignoring return value of getcwd, declared with attribute warn_unused_result info at skierpage dot com
2009-09-21 10:47 ` [Bug build/10675] " info at skierpage dot com
2010-02-23 21:03 ` tromey at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).