* gnu-nat.c, compile it without -Werror
@ 2008-09-09 15:26 Pedro Alves
2008-09-09 15:33 ` Alfred M. Szmidt
2008-09-10 17:41 ` Joel Brobecker
0 siblings, 2 replies; 3+ messages in thread
From: Pedro Alves @ 2008-09-09 15:26 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 492 bytes --]
Building gnu-nat.c fails with:
../../src/gdb/gnu-nat.c: In function 'inf_set_traced':
../../src/gdb/gnu-nat.c:884: error: suggest parentheses around assignment used
as truth value
../../src/gdb/gnu-nat.c:884: error: suggest parentheses around assignment used
as truth value
../../src/gdb/gnu-nat.c: In function 'inf_signal':
(... a few more instances of the same ...)
Turns out that warning comes from the definition of HURD_MSGPORT_RPC,
a 20+ lines system macro...
OK?
--
Pedro Alves
[-- Attachment #2: hurd_werror.diff --]
[-- Type: text/x-diff, Size: 955 bytes --]
2008-09-09 Pedro Alves <pedro@codesourcery.com>
* Makefile.in (gnu-nat.o): New rule.
---
gdb/Makefile.in | 7 +++++++
1 file changed, 7 insertions(+)
Index: src/gdb/Makefile.in
===================================================================
--- src.orig/gdb/Makefile.in 2008-09-09 16:18:48.000000000 +0100
+++ src/gdb/Makefile.in 2008-09-09 16:23:30.000000000 +0100
@@ -1363,6 +1363,13 @@ monitor.o: $(srcdir)/monitor.c
$(COMPILE.pre) $(INTERNAL_WARN_CFLAGS) $(COMPILE.post) $(srcdir)/monitor.c
$(POSTCOMPILE)
+# "gnu-nat.c" gets "suggest parentheses around assignment used as
+# truth value" errors. It turns out that there is a system header
+# that does `if (a = b)'.
+gnu-nat.o: $(srcdir)/gnu-nat.c
+ $(COMPILE.pre) $(INTERNAL_WARN_CFLAGS) $(COMPILE.post) $(srcdir)/gnu-nat.c
+ $(POSTCOMPILE)
+
# Do not try to build "printcmd.c" with -Wformat-nonliteral. It manually
# checks format strings.
printcmd.o: $(srcdir)/printcmd.c
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-10 17:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-09 15:26 gnu-nat.c, compile it without -Werror Pedro Alves
2008-09-09 15:33 ` Alfred M. Szmidt
2008-09-10 17:41 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox