From f0bef2e9a73f7df65de5f9b93fbdbc275c5d22e9 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 31 Oct 2021 23:55:51 -0400 Subject: sim: bfin: cast pointers using uintptr_t We can't assume that sizeof(long) == sizeof(void*), so change all these casts over to uintptr_t. --- sim/bfin/dv-bfin_eppi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sim/bfin/dv-bfin_eppi.c') diff --git a/sim/bfin/dv-bfin_eppi.c b/sim/bfin/dv-bfin_eppi.c index 169895d..f31782b 100644 --- a/sim/bfin/dv-bfin_eppi.c +++ b/sim/bfin/dv-bfin_eppi.c @@ -101,7 +101,7 @@ bfin_eppi_io_write_buffer (struct hw *me, const void *source, value = dv_load_2 (source); mmr_off = addr - eppi->base; - valuep = (void *)((unsigned long)eppi + mmr_base() + mmr_off); + valuep = (void *)((uintptr_t)eppi + mmr_base() + mmr_off); value16p = valuep; value32p = valuep; @@ -162,7 +162,7 @@ bfin_eppi_io_read_buffer (struct hw *me, void *dest, return 0; mmr_off = addr - eppi->base; - valuep = (void *)((unsigned long)eppi + mmr_base() + mmr_off); + valuep = (void *)((uintptr_t)eppi + mmr_base() + mmr_off); value16p = valuep; value32p = valuep; -- cgit v1.1