libtraceevent: Fix build warning on 32-bit arches
authorTzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Wed, 2 Sep 2020 10:31:21 +0000 (13:31 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 3 Sep 2020 18:45:15 +0000 (15:45 -0300)
Fixed a compilation warning for casting to pointer from integer of
different size on 32-bit platforms.

Reported-by: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
Cc: linux-trace-devel@vger.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/traceevent/event-parse.c

index 3ba566de821c6b60f0c2c7ddea5468e3292e1ff1..5acc18b326061ffb3d66e01704555014dbb8cb03 100644 (file)
@@ -5259,7 +5259,7 @@ static int print_arg_pointer(struct trace_seq *s, const char *format, int plen,
        default:
                ret = 0;
                val = eval_num_arg(data, size, event, arg);
-               trace_seq_printf(s, "%p", (void *)val);
+               trace_seq_printf(s, "%p", (void *)(intptr_t)val);
                break;
        }