This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]