From b0172f908be0d8a8990c15dd246f1e630823d9d4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 13 Jan 2021 10:40:16 +0000 Subject: [PATCH] Remove rpi warning --- src/rpi.c | 4 ++-- src/rpi.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rpi.c b/src/rpi.c index 30c75a1..f48e499 100644 --- a/src/rpi.c +++ b/src/rpi.c @@ -21,11 +21,11 @@ unsigned bcm_host_get_peripheral_address(void) unsigned address = get_dt_ranges("/proc/device-tree/soc/ranges", 4); if (address == 0) address = get_dt_ranges("/proc/device-tree/soc/ranges", 8); - return address == ~0 ? 0x20000000 : address; + return address == ~0u ? 0x20000000 : address; } unsigned bcm_host_get_sdram_address(void) { unsigned address = get_dt_ranges("/proc/device-tree/axi/vc_mem/reg", 8); - return address == ~0 ? 0x40000000 : address; + return address == ~0u ? 0x40000000 : address; } diff --git a/src/rpi.h b/src/rpi.h index f3632a5..f1e8fe9 100644 --- a/src/rpi.h +++ b/src/rpi.h @@ -1,3 +1,3 @@ -static unsigned get_dt_ranges(const char *filename, unsigned offset); +unsigned get_dt_ranges(const char *filename, unsigned offset); unsigned bcm_host_get_peripheral_address(void); unsigned bcm_host_get_sdram_address(void);