public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perfcounter: don't keep warnings treated as errors as default
@ 2009-06-04 17:14 Frederic Weisbecker
  2009-06-04 19:45 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Frederic Weisbecker @ 2009-06-04 17:14 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: LKML, Peter Zijlstra, Mike Galbraith, Paul Mackerras,
	Corey Ashford, Marcelo Tosatti, Arnaldo Carvalho de Melo,
	Frederic Weisbecker

Building userspace perfcounter tools gives such warning:

cc1: warnings being treated as errors
builtin-top.c: In function ‘print_sym_table’:
builtin-top.c:207: erreur: ignoring return value of ‘write’, declared with attribute warn_unused_result
make: *** [builtin-top.o] Erreur 1

It's about checking if a write was successful on stdout.
The real point here is that treating each warning as errors by default
can be avoided, especially for such harmless warning.

This patch drop -Werror from perfcounter tools makefile.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
 Documentation/perf_counter/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/perf_counter/Makefile b/Documentation/perf_counter/Makefile
index c9ec458..9b42897 100644
--- a/Documentation/perf_counter/Makefile
+++ b/Documentation/perf_counter/Makefile
@@ -159,7 +159,7 @@ uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
 
 # CFLAGS and LDFLAGS are for the users to override from the command line.
 
-CFLAGS = -ggdb3 -Wall -Werror -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -std=gnu99 -Wdeclaration-after-statement -O6 -march=native
+CFLAGS = -ggdb3 -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -std=gnu99 -Wdeclaration-after-statement -O6 -march=native
 LDFLAGS = -lpthread -lrt -lelf
 ALL_CFLAGS = $(CFLAGS)
 ALL_LDFLAGS = $(LDFLAGS)
-- 
1.6.2.3


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

* Re: [PATCH] perfcounter: don't keep warnings treated as errors as default
  2009-06-04 17:14 [PATCH] perfcounter: don't keep warnings treated as errors as default Frederic Weisbecker
@ 2009-06-04 19:45 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2009-06-04 19:45 UTC (permalink / raw)
  To: Frederic Weisbecker
  Cc: LKML, Peter Zijlstra, Mike Galbraith, Paul Mackerras,
	Corey Ashford, Marcelo Tosatti, Arnaldo Carvalho de Melo


* Frederic Weisbecker <fweisbec@gmail.com> wrote:

> Building userspace perfcounter tools gives such warning:
> 
> cc1: warnings being treated as errors
> builtin-top.c: In function ‘print_sym_table’:
> builtin-top.c:207: erreur: ignoring return value of ‘write’, declared with attribute warn_unused_result
> make: *** [builtin-top.o] Erreur 1

I've fixed this by changing that line to puts(CONSOLE_CLEAR) (folded 
that into your other patch). Do you get any other warnings? We want 
to fix them really.

	Ingo

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

end of thread, other threads:[~2009-06-04 19:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-04 17:14 [PATCH] perfcounter: don't keep warnings treated as errors as default Frederic Weisbecker
2009-06-04 19:45 ` Ingo Molnar

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