diff options
| author | Aymeric Vincent <aymeric.vincent@cea.fr> | 2015-11-23 16:58:26 +0100 |
|---|---|---|
| committer | Aymeric Vincent <aymeric.vincent@cea.fr> | 2015-11-23 16:58:26 +0100 |
| commit | 06e2b97eee04b1234853810236d21cd23fe5d451 (patch) | |
| tree | 6b0cc7c8cdac31159e835525fa05e3812407d58c | |
| parent | bdcd9113a9c1e4299ff534555e5283e21121ce29 (diff) | |
| download | miasm-06e2b97eee04b1234853810236d21cd23fe5d451.tar.gz miasm-06e2b97eee04b1234853810236d21cd23fe5d451.zip | |
Squelch a couple of warnings on 32 bit architectures with respect to
casts between 32 bit pointers vs 64 bit integers.
| -rw-r--r-- | miasm2/jitter/vm_mngr.c | 2 | ||||
| -rw-r--r-- | miasm2/jitter/vm_mngr_py.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/miasm2/jitter/vm_mngr.c b/miasm2/jitter/vm_mngr.c index 1a04ba63..3597ae4f 100644 --- a/miasm2/jitter/vm_mngr.c +++ b/miasm2/jitter/vm_mngr.c @@ -79,7 +79,7 @@ uint64_t set_endian64(vm_mngr_t* vm_mngr, uint64_t val) void print_val(uint64_t base, uint64_t addr) { - uint64_t *ptr = (uint64_t *) addr; + uint64_t *ptr = (uint64_t *) (intptr_t) addr; fprintf(stderr, "addr 0x%"PRIX64" val 0x%"PRIX64"\n", addr-base, *ptr); } diff --git a/miasm2/jitter/vm_mngr_py.c b/miasm2/jitter/vm_mngr_py.c index 54511c20..bb0a6207 100644 --- a/miasm2/jitter/vm_mngr_py.c +++ b/miasm2/jitter/vm_mngr_py.c @@ -531,7 +531,7 @@ VmMngr_new(PyTypeObject *type, PyObject *args, PyObject *kwds) static PyObject * VmMngr_get_vmmngr(VmMngr *self, void *closure) { - return PyLong_FromUnsignedLongLong((uint64_t)&(self->vm_mngr)); + return PyLong_FromUnsignedLongLong((uint64_t)(intptr_t)&(self->vm_mngr)); } static int |