lkml.org 
[lkml]   [2011]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] perftools: Fix build error

    * Denis Kirjanov <dkirjanov@kernel.org> wrote:

    > Fix perftools build error (ppc64 box) with PERF_VERSION = 2.6.38.rc1.47.g12fcdb
    > CC builtin-top.o
    > cc1: warnings being treated as errors
    > builtin-top.c: In function 'print_sym_table':
    > builtin-top.c:540: error: format '%Ld' expects type 'long long int', but argument 2 has type '__u64'
    >
    > Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
    > ---
    > tools/perf/builtin-top.c | 2 +-
    > 1 files changed, 1 insertions(+), 1 deletions(-)
    >
    > diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
    > index 05344c6..8202a2e 100644
    > --- a/tools/perf/builtin-top.c
    > +++ b/tools/perf/builtin-top.c
    > @@ -537,7 +537,7 @@ static void print_sym_table(void)
    > if (nr_counters == 1 || !display_weighted) {
    > struct perf_evsel *first;
    > first = list_entry(evsel_list.next, struct perf_evsel, node);
    > - printf("%Ld", first->attr.sample_period);
    > + printf("%Ld", (unsigned long long)first->attr.sample_period);

    Wouldnt %Lu solve this in a cleaner way?

    Thanks,

    Ingo


    \
     
     \ /
      Last update: 2011-01-20 12:49    [W:0.021 / U:59.308 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site