lkml.org 
[lkml]   [2012]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 01/30] perf tools: Fix a compiling error in trace-event-perl.c for 32 bits machine
    Date
    From: Feng Tang <feng.tang@intel.com>

    On my x86_32 mahcine, there is a compile error:

    CC util/scripting-engines/trace-event-perl.o
    cc1: warnings being treated as errors
    util/scripting-engines/trace-event-perl.c: In function
    perl_process_tracepoint:
    util/scripting-engines/trace-event-perl.c:285: error: format
    expects type 'int', but argument 2 has type '__u64'
    make: *** [util/scripting-engines/trace-event-perl.o] Error 1

    Fix it by using the "%PRIu64" for __u64.

    v2: use PRIu64 as suggested by Arnaldo.

    Signed-off-by: Feng Tang <feng.tang@intel.com>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/20120828101730.6b2fd97e@feng-i7
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    ---
    .../perf/util/scripting-engines/trace-event-perl.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c
    index ffde3e4..f80605e 100644
    --- a/tools/perf/util/scripting-engines/trace-event-perl.c
    +++ b/tools/perf/util/scripting-engines/trace-event-perl.c
    @@ -282,7 +282,7 @@ static void perl_process_tracepoint(union perf_event *perf_event __maybe_unused,

    event = find_cache_event(evsel);
    if (!event)
    - die("ug! no event found for type %d", evsel->attr.config);
    + die("ug! no event found for type %" PRIu64, evsel->attr.config);

    pid = raw_field_value(event, "common_pid", data);

    --
    1.7.1


    \
     
     \ /
      Last update: 2012-09-25 00:01    [W:0.050 / U:2.564 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site