lkml.org 
[lkml]   [2012]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/6] perf, tools: Fix cast from pointer to integer for 32 bit
Date
Fixing the integer cast reported by the following warning:

tools/lib/traceevent/event-parse.c:3488:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

Signed-off-by: Robert Richter <robert.richter@amd.com>
---
tools/lib/traceevent/event-parse.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 5f34aa3..b7c2c49 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -31,6 +31,7 @@
#include <stdarg.h>
#include <ctype.h>
#include <errno.h>
+#include <stdint.h>

#include "event-parse.h"
#include "event-utils.h"
@@ -3485,7 +3486,7 @@ process_defined_func(struct trace_seq *s, void *data, int size,
if (!string->str)
die("malloc str");

- args[i] = (unsigned long long)string->str;
+ args[i] = (uintptr_t)string->str;
strings = string;
trace_seq_destroy(&str);
break;
--
1.7.8.4



\
 
 \ /
  Last update: 2012-08-07 20:41    [W:0.083 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site