perfcounter: don't keep warnings treated as errors as default
PATCH 1/1 perfcounter: don't keep warnings treated as errors as default
Building userspace perfcounter tools gives such warning:
cc1: warnings being treated as errorsbuiltin-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.
--- Documentation/perf_counter/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Documentation/perf_counter/Makefile +1 -1
@@ -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)
Signature · 1 line
1.6.2.3
Quoted 6 lines · 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 attributewarn_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