diff options
author | Paul Fertser <fercerpav@gmail.com> | 2015-03-15 10:18:55 +0300 |
---|---|---|
committer | Paul Fertser <fercerpav@gmail.com> | 2015-04-16 20:24:50 +0100 |
commit | 5387d616a3d1b4550f9acecda26ead380d37dedf (patch) | |
tree | 6f9e73926f732cc7908fc44a08fab9c769550abb /src/flash | |
parent | da7b65a93becd0d45d2806e14f0c0b1e3dd6dfd5 (diff) |
Fix several format specifiers errors exposed by arm-none-eabi
Change-Id: I1fe5c5c0b22cc23deedcf13ad5183c957551a1b7
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2719
Tested-by: jenkins
Diffstat (limited to 'src/flash')
-rw-r--r-- | src/flash/nor/at91samd.c | 4 | ||||
-rw-r--r-- | src/flash/nor/lpc2000.c | 4 | ||||
-rw-r--r-- | src/flash/nor/nrf51.c | 2 | ||||
-rw-r--r-- | src/flash/nor/sim3x.c | 4 | ||||
-rw-r--r-- | src/flash/nor/stellaris.c | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/src/flash/nor/at91samd.c b/src/flash/nor/at91samd.c index de0f1cc7..e80cf92f 100644 --- a/src/flash/nor/at91samd.c +++ b/src/flash/nor/at91samd.c @@ -976,8 +976,8 @@ COMMAND_HANDLER(samd_handle_bootloader_command) nb = (2 << (8 - size)) * page_size; /* There are 4 pages per row */ - command_print(CMD_CTX, "Bootloader size is %u bytes (%u rows)", - nb, nb / (page_size * 4)); + command_print(CMD_CTX, "Bootloader size is %" PRIu32 " bytes (%" PRIu32 " rows)", + nb, (uint32_t)(nb / (page_size * 4))); } } } diff --git a/src/flash/nor/lpc2000.c b/src/flash/nor/lpc2000.c index 0247e66d..8340aea5 100644 --- a/src/flash/nor/lpc2000.c +++ b/src/flash/nor/lpc2000.c @@ -1450,7 +1450,7 @@ static int lpc2000_auto_probe_flash(struct flash_bank *bank) break; default: - LOG_ERROR("BUG: unknown Part ID encountered: 0x%x", part_id); + LOG_ERROR("BUG: unknown Part ID encountered: 0x%" PRIx32, part_id); exit(-1); } @@ -1472,7 +1472,7 @@ static int lpc2000_probe(struct flash_bank *bank) status = get_lpc2000_part_id(bank, &part_id); if (status == LPC2000_CMD_SUCCESS) LOG_INFO("If auto-detection fails for this part, please email " - "openocd-devel@lists.sourceforge.net, citing part id 0x%x.\n", part_id); + "openocd-devel@lists.sourceforge.net, citing part id 0x%" PRIx32 ".\n", part_id); } lpc2000_build_sector_list(bank); diff --git a/src/flash/nor/nrf51.c b/src/flash/nor/nrf51.c index 34297efb..351a86e4 100644 --- a/src/flash/nor/nrf51.c +++ b/src/flash/nor/nrf51.c @@ -709,7 +709,7 @@ static int nrf51_erase_page(struct flash_bank *bank, LOG_DEBUG("Erasing page at 0x%"PRIx32, sector->offset); if (sector->is_protected) { - LOG_ERROR("Cannot erase protected sector at 0x%x", sector->offset); + LOG_ERROR("Cannot erase protected sector at 0x%" PRIx32, sector->offset); return ERROR_FAIL; } diff --git a/src/flash/nor/sim3x.c b/src/flash/nor/sim3x.c index 867d0caf..7ec00767 100644 --- a/src/flash/nor/sim3x.c +++ b/src/flash/nor/sim3x.c @@ -512,8 +512,8 @@ static int sim3x_flash_write(struct flash_bank *bank, const uint8_t * buffer, ui "for padding buffer"); return ERROR_FAIL; } - LOG_INFO("odd number of bytes to write (%d), extending to %d " - "and padding with 0xff", old_count, count); + LOG_INFO("odd number of bytes to write (%" PRIu32 "), extending to %" PRIu32 + " and padding with 0xff", old_count, count); new_buffer[count - 1] = 0xff; buffer = memcpy(new_buffer, buffer, old_count); diff --git a/src/flash/nor/stellaris.c b/src/flash/nor/stellaris.c index 27b66325..451f19b7 100644 --- a/src/flash/nor/stellaris.c +++ b/src/flash/nor/stellaris.c @@ -507,12 +507,12 @@ static int get_stellaris_info(struct flash_bank *bank, char *buf, int buf_size) printed = snprintf(buf, buf_size, "did1: 0x%8.8" PRIx32 ", arch: 0x%4.4" PRIx32 - ", eproc: %s, ramsize: %ik, flashsize: %ik\n", + ", eproc: %s, ramsize: %" PRIu32 "k, flashsize: %" PRIu32 "k\n", stellaris_info->did1, stellaris_info->did1, "ARMv7M", stellaris_info->sramsiz, - stellaris_info->num_pages * stellaris_info->pagesize / 1024); + (uint32_t)(stellaris_info->num_pages * stellaris_info->pagesize / 1024)); buf += printed; buf_size -= printed; |