diff for duplicates of <20130121213823.GA4774@us.ibm.com> diff --git a/a/1.txt b/N1/1.txt index e0db69c..86d7fe0 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -4,24 +4,22 @@ Jiri Olsa [jolsa@redhat.com] wrote: | > From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> | > Date: Fri, 18 Jan 2013 11:14:28 -0800 | > Subject: [PATCH] perf: Fix compile warnings in tests/attr.c -| >=20 +| > | > Replace '%llu' in printf()s with 'PRIu64' in 'tools/perf/tests/attr.c' | > to fix compile warnings (which become errors due to -Werror). -|=20 +| | i386 and x86_64 compiles fine for me with gcc versions 4.6.3-2 and 4.7.2-2 But is broken on Power for 64bit :-( I am trying to fix that and thought that use of format specifiers like 'PRIu64' was the way to go. -|=20 +| | with your patch for x86_64 I'm getting following warnings/errors: -|=20 +| | CC tests/attr.o -| tests/attr.c: In function =E2=80=98store_event=E2=80=99: -| tests/attr.c:69:4: error: format =E2=80=98%lu=E2=80=99 expects argument o= -f type =E2=80=98long unsigned int=E2=80=99, but argument 6 has type =E2=80= -=98__u64=E2=80=99 [-Werror=3Dformat] +| 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] Here is what I see on an x86_64 box, RHEL6.2 box: @@ -36,29 +34,27 @@ Here is what I see on an x86_64 box, RHEL6.2 box: from /usr/include/asm/types.h:6, from /usr/include/linux/types.h:4, from foo5.c:1: - /usr/include/asm-generic/int-ll64.h:31:2: error: #error __u64 defined as u= -nsigned long long + /usr/include/asm-generic/int-ll64.h:31:2: error: #error __u64 defined as unsigned long long where the #error is my debug message. <snip> | make: *** [tests/attr.o] Error 1 -|=20 +| | i386 compiles fine __u64 is 'unsigned long long' on x86 and PRIu64 is 'llu' which is fine. __u64 is 'unsigned long' on Power and PRIu64 is 'lu' which is again fine. -But __u64 is 'unsigned long long' on x86_64, but PRIu64 is '%lu' bc __WORDS= -IZE +But __u64 is 'unsigned long long' on x86_64, but PRIu64 is '%lu' bc __WORDSIZE is 64. On x86_64, shouldn't __u64, be defined as 'unsigned long' rather than 'unsigned long long' - ie include 'int-l64.h' rather than 'int-ll64.h' ? BTW, does 'perf' with my patch compile, (with warnings) for you on x86_64 -with 'WERROR=3D0 make' ? +with 'WERROR=0 make' ? Sukadev diff --git a/a/content_digest b/N1/content_digest index b678008..239e402 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -4,11 +4,11 @@ "Subject\0Re: [PATCH] perf: Fix compile warnings in tests/attr.c\0" "Date\0Mon, 21 Jan 2013 13:38:23 -0800\0" "To\0Jiri Olsa <jolsa@redhat.com>\0" - "Cc\0linuxppc-dev@ozlabs.org" + "Cc\0acme@ghostprotocols.net" Anton Blanchard <anton@au1.ibm.com> paulus@samba.org linux-kernel@vger.kernel.org - " acme@ghostprotocols.net\0" + " linuxppc-dev@ozlabs.org\0" "\00:1\0" "b\0" "Jiri Olsa [jolsa@redhat.com] wrote:\n" @@ -17,24 +17,22 @@ "| > From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>\n" "| > Date: Fri, 18 Jan 2013 11:14:28 -0800\n" "| > Subject: [PATCH] perf: Fix compile warnings in tests/attr.c\n" - "| >=20\n" + "| > \n" "| > Replace '%llu' in printf()s with 'PRIu64' in 'tools/perf/tests/attr.c'\n" "| > to fix compile warnings (which become errors due to -Werror).\n" - "|=20\n" + "| \n" "| i386 and x86_64 compiles fine for me with gcc versions 4.6.3-2 and 4.7.2-2\n" "\n" "But is broken on Power for 64bit :-( I am trying to fix that and thought\n" "that use of format specifiers like 'PRIu64' was the way to go.\n" "\n" - "|=20\n" + "| \n" "| with your patch for x86_64 I'm getting following warnings/errors:\n" "\n" - "|=20\n" + "| \n" "| CC tests/attr.o\n" - "| tests/attr.c: In function =E2=80=98store_event=E2=80=99:\n" - "| tests/attr.c:69:4: error: format =E2=80=98%lu=E2=80=99 expects argument o=\n" - "f type =E2=80=98long unsigned int=E2=80=99, but argument 6 has type =E2=80=\n" - "=98__u64=E2=80=99 [-Werror=3Dformat]\n" + "| tests/attr.c: In function \342\200\230store_event\342\200\231:\n" + "| tests/attr.c:69:4: error: format \342\200\230%lu\342\200\231 expects argument of type \342\200\230long unsigned int\342\200\231, but argument 6 has type \342\200\230__u64\342\200\231 [-Werror=format]\n" "\n" "Here is what I see on an x86_64 box, RHEL6.2 box:\n" "\n" @@ -49,31 +47,29 @@ "\t\t\t from /usr/include/asm/types.h:6,\n" "\t\t\t from /usr/include/linux/types.h:4,\n" "\t\t\t from foo5.c:1:\n" - "\t/usr/include/asm-generic/int-ll64.h:31:2: error: #error __u64 defined as u=\n" - "nsigned long long\n" + "\t/usr/include/asm-generic/int-ll64.h:31:2: error: #error __u64 defined as unsigned long long\n" "\n" "where the #error is my debug message.\n" "\n" "<snip>\n" "\n" "| make: *** [tests/attr.o] Error 1\n" - "|=20\n" + "| \n" "| i386 compiles fine\n" "\n" "__u64 is 'unsigned long long' on x86 and PRIu64 is 'llu' which is fine.\n" "\n" "__u64 is 'unsigned long' on Power and PRIu64 is 'lu' which is again fine.\n" "\n" - "But __u64 is 'unsigned long long' on x86_64, but PRIu64 is '%lu' bc __WORDS=\n" - "IZE\n" + "But __u64 is 'unsigned long long' on x86_64, but PRIu64 is '%lu' bc __WORDSIZE\n" "is 64.\n" "\n" "On x86_64, shouldn't __u64, be defined as 'unsigned long' rather than\n" "'unsigned long long' - ie include 'int-l64.h' rather than 'int-ll64.h' ?\n" "\n" "BTW, does 'perf' with my patch compile, (with warnings) for you on x86_64\n" - "with 'WERROR=3D0 make' ?\n" + "with 'WERROR=0 make' ?\n" "\n" Sukadev -746d62fd30d0e091f469c668842a5e9463f991e903542e09a78edc8516a70a40 +77ac81431c4125e4050229bd3e10b02eb539ed563b5cea5decdf3f1f1b03e18a
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.