forked from auracaster/openocd
openocd: fix conversion string for stdint values
Detected while converting 'unsigned' to 'unsigned int'. Use the correct conversion string for stdint values. Change-Id: I99f3dff4c64dfd7acf2bddb130b56e9ebe1e6c60 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8477 Tested-by: jenkins
This commit is contained in:
@@ -389,9 +389,8 @@ static int at91sam9_read_page(struct nand_device *nand, uint32_t page,
|
||||
uint32_t bit = parity & 0x0F;
|
||||
|
||||
data[word] ^= (0x1) << bit;
|
||||
LOG_INFO("Data word %d, bit %d corrected.",
|
||||
(unsigned) word,
|
||||
(unsigned) bit);
|
||||
LOG_INFO("Data word %" PRIu32 ", bit %" PRIu32 " corrected.",
|
||||
word, bit);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -890,8 +890,7 @@ static int lpc3180_read_page(struct nand_device *nand,
|
||||
|
||||
if (mlc_isr & 0x8) {
|
||||
if (mlc_isr & 0x40) {
|
||||
LOG_ERROR("uncorrectable error detected: 0x%2.2x",
|
||||
(unsigned)mlc_isr);
|
||||
LOG_ERROR("uncorrectable error detected: 0x%2.2" PRIx32, mlc_isr);
|
||||
free(page_buffer);
|
||||
free(oob_buffer);
|
||||
return ERROR_NAND_OPERATION_FAILED;
|
||||
|
||||
@@ -1386,8 +1386,7 @@ static int lpc32xx_read_page_mlc(struct nand_device *nand, uint32_t page,
|
||||
|
||||
if (mlc_isr & 0x8) {
|
||||
if (mlc_isr & 0x40) {
|
||||
LOG_ERROR("uncorrectable error detected: "
|
||||
"0x%2.2x", (unsigned)mlc_isr);
|
||||
LOG_ERROR("uncorrectable error detected: 0x%2.2" PRIx32, mlc_isr);
|
||||
return ERROR_NAND_OPERATION_FAILED;
|
||||
}
|
||||
|
||||
|
||||
@@ -2051,7 +2051,7 @@ do_retry:
|
||||
case AT91C_EFC_FCMD_CLB:
|
||||
n = (private->size_bytes / private->page_size);
|
||||
if (argument >= n)
|
||||
LOG_ERROR("*BUG*: Embedded flash has only %u pages", (unsigned)(n));
|
||||
LOG_ERROR("*BUG*: Embedded flash has only %" PRIu32 " pages", n);
|
||||
break;
|
||||
|
||||
case AT91C_EFC_FCMD_SFB:
|
||||
@@ -2867,8 +2867,8 @@ static int sam3_read_this_reg(struct sam3_chip *chip, uint32_t *goes_here)
|
||||
|
||||
r = target_read_u32(chip->target, reg->address, goes_here);
|
||||
if (r != ERROR_OK) {
|
||||
LOG_ERROR("Cannot read SAM3 register: %s @ 0x%08x, Err: %d",
|
||||
reg->name, (unsigned)(reg->address), r);
|
||||
LOG_ERROR("Cannot read SAM3 register: %s @ 0x%08" PRIx32 ", Err: %d",
|
||||
reg->name, reg->address, r);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
@@ -2883,8 +2883,8 @@ static int sam3_read_all_regs(struct sam3_chip *chip)
|
||||
r = sam3_read_this_reg(chip,
|
||||
sam3_get_reg_ptr(&(chip->cfg), reg));
|
||||
if (r != ERROR_OK) {
|
||||
LOG_ERROR("Cannot read SAM3 register: %s @ 0x%08x, Error: %d",
|
||||
reg->name, ((unsigned)(reg->address)), r);
|
||||
LOG_ERROR("Cannot read SAM3 register: %s @ 0x%08" PRIx32 ", Error: %d",
|
||||
reg->name, reg->address, r);
|
||||
return r;
|
||||
}
|
||||
reg++;
|
||||
|
||||
@@ -1501,7 +1501,7 @@ do_retry:
|
||||
case AT91C_EFC_FCMD_CLB:
|
||||
n = (private->size_bytes / private->page_size);
|
||||
if (argument >= n)
|
||||
LOG_ERROR("*BUG*: Embedded flash has only %u pages", (unsigned)(n));
|
||||
LOG_ERROR("*BUG*: Embedded flash has only %" PRIu32 " pages", n);
|
||||
break;
|
||||
|
||||
case AT91C_EFC_FCMD_SFB:
|
||||
@@ -2374,8 +2374,8 @@ static int sam4_read_this_reg(struct sam4_chip *chip, uint32_t *goes_here)
|
||||
|
||||
r = target_read_u32(chip->target, reg->address, goes_here);
|
||||
if (r != ERROR_OK) {
|
||||
LOG_ERROR("Cannot read SAM4 register: %s @ 0x%08x, Err: %d",
|
||||
reg->name, (unsigned)(reg->address), r);
|
||||
LOG_ERROR("Cannot read SAM4 register: %s @ 0x%08" PRIx32 ", Err: %d",
|
||||
reg->name, reg->address, r);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
@@ -2390,8 +2390,8 @@ static int sam4_read_all_regs(struct sam4_chip *chip)
|
||||
r = sam4_read_this_reg(chip,
|
||||
sam4_get_reg_ptr(&(chip->cfg), reg));
|
||||
if (r != ERROR_OK) {
|
||||
LOG_ERROR("Cannot read SAM4 register: %s @ 0x%08x, Error: %d",
|
||||
reg->name, ((unsigned)(reg->address)), r);
|
||||
LOG_ERROR("Cannot read SAM4 register: %s @ 0x%08" PRIx32 ", Error: %d",
|
||||
reg->name, reg->address, r);
|
||||
return r;
|
||||
}
|
||||
reg++;
|
||||
|
||||
@@ -2219,8 +2219,7 @@ static int cfi_read(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, u
|
||||
uint8_t current_word[CFI_MAX_BUS_WIDTH];
|
||||
int retval;
|
||||
|
||||
LOG_DEBUG("reading buffer of %i byte at 0x%8.8x",
|
||||
(int)count, (unsigned)offset);
|
||||
LOG_DEBUG("reading buffer of %" PRIi32 " byte at 0x%8.8" PRIx32, count, offset);
|
||||
|
||||
if (bank->target->state != TARGET_HALTED) {
|
||||
LOG_ERROR("Target not halted");
|
||||
|
||||
@@ -388,8 +388,8 @@ static int max32xxx_write_block(struct flash_bank *bank, const uint8_t *buffer,
|
||||
return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
LOG_DEBUG("retry target_alloc_working_area(%s, size=%u)",
|
||||
target_name(target), (unsigned) buffer_size);
|
||||
LOG_DEBUG("retry target_alloc_working_area(%s, size=%" PRIu32 ")",
|
||||
target_name(target), buffer_size);
|
||||
}
|
||||
|
||||
target_write_buffer(target, write_algorithm->address, sizeof(write_code),
|
||||
|
||||
@@ -1056,8 +1056,8 @@ static int stellaris_write_block(struct flash_bank *bank,
|
||||
target_free_working_area(target, write_algorithm);
|
||||
return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
|
||||
}
|
||||
LOG_DEBUG("retry target_alloc_working_area(%s, size=%u)",
|
||||
target_name(target), (unsigned) buffer_size);
|
||||
LOG_DEBUG("retry target_alloc_working_area(%s, size=%" PRIu32 ")",
|
||||
target_name(target), buffer_size);
|
||||
}
|
||||
|
||||
target_write_buffer(target, write_algorithm->address,
|
||||
|
||||
@@ -239,8 +239,8 @@ static int tms470_read_part_info(struct flash_bank *bank)
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_WARNING("Could not identify part 0x%02x as a member of the TMS470 family.",
|
||||
(unsigned)part_number);
|
||||
LOG_WARNING("Could not identify part 0x%02" PRIx32 " as a member of the TMS470 family.",
|
||||
part_number);
|
||||
return ERROR_FLASH_OPERATION_FAILED;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user