]> git.baikalelectronics.ru Git - kernel.git/commitdiff
tools lib traceevent: Fix build failure on 32-bit arch
authorNamhyung Kim <namhyung@kernel.org>
Fri, 24 Apr 2015 01:45:16 +0000 (10:45 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 24 Apr 2015 15:47:10 +0000 (12:47 -0300)
In my i386 build, it failed like this:

    CC       event-parse.o
  event-parse.c: In function 'print_str_arg':
  event-parse.c:3868:5: warning: format '%lu' expects argument of type 'long unsigned int',
                        but argument 3 has type 'uint64_t' [-Wformat]

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Javi Merino <javi.merino@arm.com>
Link: http://lkml.kernel.org/r/20150424020218.GF1905@sejong
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/traceevent/event-parse.c

index 12a7e2a40c89cdd02d1cc0ea63f66ba07860efb8..aa21bd55bd8a2fd17b0b8cf99f428be5aed771c4 100644 (file)
@@ -3865,7 +3865,7 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
                        } else if (el_size == 4) {
                                trace_seq_printf(s, "%u", *(uint32_t *)num);
                        } else if (el_size == 8) {
-                               trace_seq_printf(s, "%lu", *(uint64_t *)num);
+                               trace_seq_printf(s, "%"PRIu64, *(uint64_t *)num);
                        } else {
                                trace_seq_printf(s, "BAD SIZE:%d 0x%x",
                                                 el_size, *(uint8_t *)num);