From a2389c71eaa446923617da97f56ffa4c6dec410c Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Thu, 14 Jan 2021 16:24:31 +0100 Subject: [PATCH] software: Fix cast from pointer to integer of different size warnings litex/soc/software/liblitesdcard/sdcard.c: In function 'sdcard_read': litex/soc/software/liblitesdcard/sdcard.c:476:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] sdblock2mem_dma_base_write((uint64_t) buf); ^ litex/soc/software/liblitesdcard/sdcard.c: In function 'sdcard_write': litex/soc/software/liblitesdcard/sdcard.c:507:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] sdmem2block_dma_base_write((uint64_t) buf); ^ When casting a pointer (32-bit or 64-bit, depending on the platform) to a 64-bit integer, an intermediate cast to "uintptr_t" should be used to avoid warnings like the above. Signed-off-by: Geert Uytterhoeven --- litex/soc/software/liblitesata/sata.c | 4 ++-- litex/soc/software/liblitesdcard/sdcard.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/litex/soc/software/liblitesata/sata.c b/litex/soc/software/liblitesata/sata.c index 3e8250373..90477e3b5 100644 --- a/litex/soc/software/liblitesata/sata.c +++ b/litex/soc/software/liblitesata/sata.c @@ -51,7 +51,7 @@ void sata_read(uint32_t sector, uint32_t count, uint8_t* buf) for (i=0; i