aboutsummaryrefslogtreecommitdiff
path: root/sim/bfin/dv-bfin_uart2.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-10-31 23:55:51 -0400
committerMike Frysinger <vapier@gentoo.org>2021-10-31 23:55:51 -0400
commitf0bef2e9a73f7df65de5f9b93fbdbc275c5d22e9 (patch)
tree030aab76933a75b503cc7dab5c44465ad9ed290d /sim/bfin/dv-bfin_uart2.c
parentfad7f13ae13b03edfd8f0f2833af09d3a65a6bc7 (diff)
downloadbinutils-f0bef2e9a73f7df65de5f9b93fbdbc275c5d22e9.zip
binutils-f0bef2e9a73f7df65de5f9b93fbdbc275c5d22e9.tar.gz
binutils-f0bef2e9a73f7df65de5f9b93fbdbc275c5d22e9.tar.bz2
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.
Diffstat (limited to 'sim/bfin/dv-bfin_uart2.c')
-rw-r--r--sim/bfin/dv-bfin_uart2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/bfin/dv-bfin_uart2.c b/sim/bfin/dv-bfin_uart2.c
index a798588..c330838 100644
--- a/sim/bfin/dv-bfin_uart2.c
+++ b/sim/bfin/dv-bfin_uart2.c
@@ -83,7 +83,7 @@ bfin_uart_io_write_buffer (struct hw *me, const void *source,
value = dv_load_2 (source);
mmr_off = addr - uart->base;
- valuep = (void *)((unsigned long)uart + mmr_base() + mmr_off);
+ valuep = (void *)((uintptr_t)uart + mmr_base() + mmr_off);
HW_TRACE_WRITE ();
@@ -140,7 +140,7 @@ bfin_uart_io_read_buffer (struct hw *me, void *dest,
return 0;
mmr_off = addr - uart->base;
- valuep = (void *)((unsigned long)uart + mmr_base() + mmr_off);
+ valuep = (void *)((uintptr_t)uart + mmr_base() + mmr_off);
HW_TRACE_READ ();