Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Qustion about compile gdb-6.71. and gdb-6.8 error
@ 2009-06-22 13:30 loody
  2009-06-22 16:07 ` Paul Pluzhnikov
  0 siblings, 1 reply; 2+ messages in thread
From: loody @ 2009-06-22 13:30 UTC (permalink / raw)
  To: gdb

Dear all:
I try to compile gdb but I get error message below:
linux-nat.c:2834: error: ignoring return value of \u2018fgets\u2019,
declared with attribute warn_unused_result

I know this error comes from my gcc waring option -Werror like below:
gcc -c -g -O2    -I. -I.././gdb -I.././gdb/config
-DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H
-I.././gdb/../include/opcode -I.././gdb/../readline/.. -I../bfd
-I.././gdb/../bfd -I.././gdb/../include   -DMI_OUT=1 -DTUI=1  -Wall
-Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral
-Wno-pointer-sign -Wno-unused -Wno-switch -Wno-char-subscripts -Werror
linux-nat.c

Why we add -Werror here and how can we compile it successfully except
removing this option?
appreciate your help,
miloody


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Qustion about compile gdb-6.71. and gdb-6.8 error
  2009-06-22 13:30 Qustion about compile gdb-6.71. and gdb-6.8 error loody
@ 2009-06-22 16:07 ` Paul Pluzhnikov
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Pluzhnikov @ 2009-06-22 16:07 UTC (permalink / raw)
  To: loody; +Cc: gdb

On Mon, Jun 22, 2009 at 6:30 AM, loody<miloody@gmail.com> wrote:

> I try to compile gdb but I get error message below:
> linux-nat.c:2834: error: ignoring return value of \u2018fgets\u2019,
> declared with attribute warn_unused_result

Current GDB sources do not contain fgets() call at that line.

> I know this error comes from my gcc waring option -Werror like below:
...
> Why we add -Werror here

Because it helps catch bugs.

> how can we compile it successfully except removing this option?

If you don't plan on modifying GDB sources, just remove the -Werror.
If you do, please use current sources from CVS Head.

Cheers,
-- 
Paul Pluzhnikov


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-22 16:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-22 13:30 Qustion about compile gdb-6.71. and gdb-6.8 error loody
2009-06-22 16:07 ` Paul Pluzhnikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox