mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
software: Use "%p" to format pointer values
To fix compiler warnings of the following type: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'foo *' [-Wformat=] Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:
parent
19e7b53762
commit
c3dea1b9fd
2 changed files with 6 additions and 6 deletions
|
@ -273,7 +273,7 @@ static int copy_file_from_tftp_to_ram(unsigned int ip, unsigned short server_por
|
||||||
const char *filename, char *buffer)
|
const char *filename, char *buffer)
|
||||||
{
|
{
|
||||||
int size;
|
int size;
|
||||||
printf("Copying %s to 0x%08x... ", filename, buffer);
|
printf("Copying %s to %p... ", filename, buffer);
|
||||||
size = tftp_get(ip, server_port, filename, buffer);
|
size = tftp_get(ip, server_port, filename, buffer);
|
||||||
if(size > 0)
|
if(size > 0)
|
||||||
printf("(%d bytes)", size);
|
printf("(%d bytes)", size);
|
||||||
|
|
|
@ -53,7 +53,7 @@ int memtest_access(unsigned int *addr)
|
||||||
array[0] = ZEROONE;
|
array[0] = ZEROONE;
|
||||||
array[1] = array[0];
|
array[1] = array[0];
|
||||||
if (ctrl_bus_errors_read() - bus_errors) {
|
if (ctrl_bus_errors_read() - bus_errors) {
|
||||||
printf("memtest_access error @ 0x%0x, exiting memtest.\n", addr);
|
printf("memtest_access error @ %p, exiting memtest.\n", addr);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ int memtest_bus(unsigned int *addr, unsigned long size)
|
||||||
if(rdata != ONEZERO) {
|
if(rdata != ONEZERO) {
|
||||||
errors++;
|
errors++;
|
||||||
#ifdef MEMTEST_BUS_DEBUG
|
#ifdef MEMTEST_BUS_DEBUG
|
||||||
printf("memtest_bus error @ 0x%0x: 0x%08x vs 0x%08x\n", addr + i, rdata, ONEZERO);
|
printf("memtest_bus error @ %p: 0x%08x vs 0x%08x\n", addr + i, rdata, ONEZERO);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ int memtest_bus(unsigned int *addr, unsigned long size)
|
||||||
if(rdata != ZEROONE) {
|
if(rdata != ZEROONE) {
|
||||||
errors++;
|
errors++;
|
||||||
#ifdef MEMTEST_BUS_DEBUG
|
#ifdef MEMTEST_BUS_DEBUG
|
||||||
printf("memtest_bus error @ 0x%0x:: 0x%08x vs 0x%08x\n", addr + i, rdata, ZEROONE);
|
printf("memtest_bus error @ %p:: 0x%08x vs 0x%08x\n", addr + i, rdata, ZEROONE);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ int memtest_addr(unsigned int *addr, unsigned long size, int random)
|
||||||
if(rdata != i) {
|
if(rdata != i) {
|
||||||
errors++;
|
errors++;
|
||||||
#ifdef MEMTEST_ADDR_DEBUG
|
#ifdef MEMTEST_ADDR_DEBUG
|
||||||
printf("memtest_addr error @ 0x%0x: 0x%08x vs 0x%08x\n", addr + i, rdata, i);
|
printf("memtest_addr error @ %p: 0x%08x vs 0x%08x\n", addr + i, rdata, i);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -202,7 +202,7 @@ int memtest_data(unsigned int *addr, unsigned long size, int random)
|
||||||
if(rdata != seed_32) {
|
if(rdata != seed_32) {
|
||||||
errors++;
|
errors++;
|
||||||
#ifdef MEMTEST_DATA_DEBUG
|
#ifdef MEMTEST_DATA_DEBUG
|
||||||
printf("memtest_data error @%0x: 0x%08x vs 0x%08x\n", addr + i, rdata, seed_32);
|
printf("memtest_data error @%p: 0x%08x vs 0x%08x\n", addr + i, rdata, seed_32);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (i%0x8000 == 0)
|
if (i%0x8000 == 0)
|
||||||
|
|
Loading…
Reference in a new issue