diff --git a/src/flash/nor/stm32f1x.c b/src/flash/nor/stm32f1x.c index ce0708f65..30652c6f0 100644 --- a/src/flash/nor/stm32f1x.c +++ b/src/flash/nor/stm32f1x.c @@ -1347,9 +1347,9 @@ COMMAND_HANDLER(stm32x_handle_options_read_command) } command_print(CMD_CTX, "User Option0: 0x%02" PRIx8, - (user_data >> stm32x_info->user_data_offset) & 0xff); + (uint8_t)((user_data >> stm32x_info->user_data_offset) & 0xff)); command_print(CMD_CTX, "User Option1: 0x%02" PRIx8, - (user_data >> (stm32x_info->user_data_offset + 8)) & 0xff); + (uint8_t)((user_data >> (stm32x_info->user_data_offset + 8)) & 0xff)); return ERROR_OK; }