xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xenalyze: add missing casts to fix 64bit build
@ 2012-01-12 13:52 Olaf Hering
  2012-01-12 17:56 ` Ian Jackson
  2012-01-26 12:27 ` George Dunlap
  0 siblings, 2 replies; 5+ messages in thread
From: Olaf Hering @ 2012-01-12 13:52 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1326374876 -3600
# Node ID 94f71dded5ab5a31224b852aac6b238b590b7b25
# Parent  223e8ad4c7557960e29a7c294bb94723b2cd7f09
xenalyze: add missing casts to fix 64bit build

xenalyze.c: In function 'hvm_mmio_summary':
xenalyze.c:3728: error: cast from pointer to integer of different size
xenalyze.c: In function 'hvm_mmio_assist_postprocess':
xenalyze.c:3743: error: cast to pointer from integer of different size
xenalyze.c:3747: error: cast to pointer from integer of different size
xenalyze.c:3759: error: cast to pointer from integer of different size
xenalyze.c: In function 'hvm_cr_write_summary':
xenalyze.c:4251: error: cast from pointer to integer of different size
xenalyze.c: In function 'hvm_generic_summary':
xenalyze.c:4800: error: cast from pointer to integer of different size
xenalyze.c: In function 'hvm_generic_postprocess':
xenalyze.c:4871: error: cast to pointer from integer of different size
make: *** [xenalyze] Error 1

Signed-off-by: Olaf Hering <olaf@aepfle.de>

diff -r 223e8ad4c755 -r 94f71dded5ab xenalyze.c
--- a/xenalyze.c
+++ b/xenalyze.c
@@ -3725,7 +3725,7 @@ void enumerate_mmio(struct hvm_data *h)
 
 void hvm_mmio_summary(struct hvm_data *h, void *data)
 {
-    int reason=(int)data;
+    int reason=(long)data;
 
     PRINT_SUMMARY(h->summary.mmio[reason],
                   "   mmio ");
@@ -3740,11 +3740,11 @@ void hvm_mmio_assist_postprocess(struct 
     case VMEXIT_NPF:
     case EXIT_REASON_EPT_VIOLATION:
         reason=NONPF_MMIO_NPF;
-        hvm_set_summary_handler(h, hvm_mmio_summary, (void *)reason);
+        hvm_set_summary_handler(h, hvm_mmio_summary, (void *)(long)reason);
         break;
     case EXIT_REASON_APIC_ACCESS:
         reason=NONPF_MMIO_APIC;
-        hvm_set_summary_handler(h, hvm_mmio_summary, (void *)reason);
+        hvm_set_summary_handler(h, hvm_mmio_summary, (void *)(long)reason);
         break;
     default:
     {
@@ -3756,7 +3756,7 @@ void hvm_mmio_assist_postprocess(struct 
             warned=1;
         }
         reason=NONPF_MMIO_UNKNOWN;
-        hvm_set_summary_handler(h, hvm_mmio_summary, (void *)reason);
+        hvm_set_summary_handler(h, hvm_mmio_summary, (void *)(long)reason);
         break;
     }
     }
@@ -4248,7 +4248,7 @@ void hvm_cr3_write_summary(struct hvm_da
 
 void hvm_cr_write_summary(struct hvm_data *h, void *data)
 {
-    int cr=(int)data;
+    int cr=(long)data;
 
     PRINT_SUMMARY(h->summary.cr_write[cr],
                   "   cr%d ", cr);
@@ -4797,7 +4797,7 @@ void hvm_rdtsc_process(struct record_inf
 
 void hvm_generic_summary(struct hvm_data *h, void *data)
 {
-    int evt = (int)data;
+    int evt = (long)data;
 
     assert(evt < HVM_EVENT_HANDLER_MAX);
 
@@ -4868,7 +4868,7 @@ void hvm_generic_postprocess(struct hvm_
         else
         {
             int ret;
-            if((ret=__hvm_set_summary_handler(h, hvm_generic_summary, (void *)evt)))
+            if((ret=__hvm_set_summary_handler(h, hvm_generic_summary, (void *)(long)evt)))
                 fprintf(stderr, "%s: hvm_set_summary_handler returned %d\n",
                         __func__, ret);
             registered[evt]=h->exit_reason+1;

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-01-26 16:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-12 13:52 [PATCH] xenalyze: add missing casts to fix 64bit build Olaf Hering
2012-01-12 17:56 ` Ian Jackson
2012-01-26 12:27 ` George Dunlap
2012-01-26 16:43   ` Olaf Hering
2012-01-26 16:45     ` George Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).