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:
Antonio Borneo
2024-09-08 23:11:45 +02:00
parent 8750beeb44
commit bf1cf4afbb
24 changed files with 78 additions and 102 deletions

View File

@@ -1473,10 +1473,9 @@ void jtag_tap_init(struct jtag_tap *tap)
jtag_tap_add(tap);
LOG_DEBUG("Created Tap: %s @ abs position %u, "
"irlen %u, capture: 0x%x mask: 0x%x", tap->dotted_name,
"irlen %u, capture: 0x%" PRIx32 " mask: 0x%" PRIx32, tap->dotted_name,
tap->abs_chain_position, tap->ir_length,
(unsigned) tap->ir_capture_value,
(unsigned) tap->ir_capture_mask);
tap->ir_capture_value, tap->ir_capture_mask);
}
void jtag_tap_free(struct jtag_tap *tap)

View File

@@ -803,10 +803,8 @@ COMMAND_HANDLER(handle_scan_chain_command)
while (tap) {
uint32_t expected, expected_mask, ii;
snprintf(expected_id, sizeof(expected_id), "0x%08x",
(unsigned)((tap->expected_ids_cnt > 0)
? tap->expected_ids[0]
: 0));
snprintf(expected_id, sizeof(expected_id), "0x%08" PRIx32,
(tap->expected_ids_cnt > 0) ? tap->expected_ids[0] : 0);
if (tap->ignore_version)
expected_id[2] = '*';
@@ -825,8 +823,7 @@ COMMAND_HANDLER(handle_scan_chain_command)
(unsigned int)(expected_mask));
for (ii = 1; ii < tap->expected_ids_cnt; ii++) {
snprintf(expected_id, sizeof(expected_id), "0x%08x",
(unsigned) tap->expected_ids[ii]);
snprintf(expected_id, sizeof(expected_id), "0x%08" PRIx32, tap->expected_ids[ii]);
if (tap->ignore_version)
expected_id[2] = '*';