Re: [PATCH] perf: Fix compile warnings in tests/attr.c

From: Jiri Olsa
Date: Mon Jan 21 2013 - 08:59:24 EST


On Fri, Jan 18, 2013 at 05:30:52PM -0800, Sukadev Bhattiprolu wrote:
> From 4d266e5040c33103f5d226b0d16b89f8ef79e3ad Mon Sep 17 00:00:00 2001
> From: Sukadev Bhattiprolu <sukadev@xxxxxxxxxxxxxxxxxx>
> Date: Fri, 18 Jan 2013 11:14:28 -0800
> Subject: [PATCH] perf: Fix compile warnings in tests/attr.c
>
> Replace '%llu' in printf()s with 'PRIu64' in 'tools/perf/tests/attr.c'
> to fix compile warnings (which become errors due to -Werror).

i386 and x86_64 compiles fine for me with gcc versions 4.6.3-2 and 4.7.2-2

with your patch for x86_64 I'm getting following warnings/errors:

CC tests/attr.o
tests/attr.c: In function âstore_eventâ:
tests/attr.c:69:4: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 6 has type â__u64â [-Werror=format]
tests/attr.c:69:4: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 6 has type â__u64â [-Werror=format]
tests/attr.c:78:7: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 4 has type â__u64â [-Werror=format]
tests/attr.c:94:2: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 4 has type â__u64â [-Werror=format]
tests/attr.c:94:2: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 4 has type â__u64â [-Werror=format]
tests/attr.c:95:2: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 4 has type â__u64â [-Werror=format]
tests/attr.c:95:2: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 4 has type â__u64â [-Werror=format]
tests/attr.c:96:2: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 4 has type â__u64â [-Werror=format]
tests/attr.c:96:2: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 4 has type â__u64â [-Werror=format]
tests/attr.c:97:2: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 4 has type â__u64â [-Werror=format]
tests/attr.c:97:2: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 4 has type â__u64â [-Werror=format]
tests/attr.c:122:2: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 4 has type â__u64â [-Werror=format]
tests/attr.c:122:2: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 4 has type â__u64â [-Werror=format]
tests/attr.c:123:2: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 4 has type â__u64â [-Werror=format]
tests/attr.c:123:2: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 4 has type â__u64â [-Werror=format]
tests/attr.c:124:2: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 4 has type â__u64â [-Werror=format]
tests/attr.c:124:2: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 4 has type â__u64â [-Werror=format]
tests/attr.c:125:2: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 4 has type â__u64â [-Werror=format]
tests/attr.c:125:2: error: format â%luâ expects argument of type âlong unsigned intâ, but argument 4 has type â__u64â [-Werror=format]
cc1: all warnings being treated as errors
make: *** [tests/attr.o] Error 1

i386 compiles fine

jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/