diff mbox

trace/simple: Fix compiler warning for 32 bit hosts

Message ID 1344887456-19118-1-git-send-email-sw@weilnetz.de
State Accepted
Headers show

Commit Message

Stefan Weil Aug. 13, 2012, 7:50 p.m. UTC
gcc complains when a 32 bit pointer is casted to a 64 bit integer.

Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 scripts/tracetool/backend/simple.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Stefan Hajnoczi Aug. 14, 2012, 12:30 p.m. UTC | #1
On Mon, Aug 13, 2012 at 09:50:56PM +0200, Stefan Weil wrote:
> gcc complains when a 32 bit pointer is casted to a 64 bit integer.
> 
> Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  scripts/tracetool/backend/simple.py |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Thanks, applied to the tracing tree:
https://github.com/stefanha/qemu/commits/tracing

Stefan
diff mbox

Patch

diff --git a/scripts/tracetool/backend/simple.py b/scripts/tracetool/backend/simple.py
index c7e47d6..e4b4a7f 100644
--- a/scripts/tracetool/backend/simple.py
+++ b/scripts/tracetool/backend/simple.py
@@ -79,7 +79,7 @@  def c(events):
                        )
                 # pointer var (not string)
                 elif type_.endswith('*'):
-                    out('    trace_record_write_u64(&rec, (uint64_t)(uint64_t *)%(name)s);',
+                    out('    trace_record_write_u64(&rec, (uintptr_t)(uint64_t *)%(name)s);',
                         name = name,
                        )
                 # primitive data type