From c9ab9cb0c791dc7d3e2c5fa1f660a3945cbe631a Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Mon, 27 Jun 2011 22:29:27 +0000 Subject: [PATCH] Build on amd64 architecture. printf("%x") -> printf("%zx") when using size_t --- src/stlink-hw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stlink-hw.c b/src/stlink-hw.c index dab59f1..9e9996c 100644 --- a/src/stlink-hw.c +++ b/src/stlink-hw.c @@ -1417,7 +1417,7 @@ int stlink_write_flash(struct stlink* sl, stm32_addr_t addr, uint8_t* base, unsi size = len - off; if(run_flash_loader(sl, &fl, addr + off, base + off, size) == -1) { - fprintf(stderr, "run_flash_loader(0x%x) == -1\n", addr + off); + fprintf(stderr, "run_flash_loader(0x%zx) == -1\n", addr + off); return -1; } } @@ -1488,7 +1488,7 @@ static int stlink_fwrite_flash /* addr must be an addr inside the page */ if (stlink_erase_flash_page(sl, addr + off) == -1) { - fprintf(stderr, "erase_flash_page(0x%x) == -1\n", addr + off); + fprintf(stderr, "erase_flash_page(0x%zx) == -1\n", addr + off); goto on_error; } } @@ -1511,7 +1511,7 @@ static int stlink_fwrite_flash if (run_flash_loader(sl, &fl, addr + off, mf.base + off, size) == -1) { - fprintf(stderr, "run_flash_loader(0x%x) == -1\n", addr + off); + fprintf(stderr, "run_flash_loader(0x%zx) == -1\n", addr + off); goto on_error; } } -- 2.30.2