This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Qustion about compile gdb-6.71. and gdb-6.8 error
- From: loody <miloody at gmail dot com>
- To: gdb at sourceware dot org
- Date: Mon, 22 Jun 2009 21:30:49 +0800
- Subject: Qustion about compile gdb-6.71. and gdb-6.8 error
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