adiv5_swdp: Initialize a volatile variable

GCC did not warn about possibly missing initialization and so for gdb target
was not recognized.
This commit is contained in:
Uwe Bonnes 2021-11-20 22:29:33 +01:00 committed by UweBonnes
parent 5cb501049a
commit 73b4612ec7
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ int adiv5_swdp_scan(uint32_t targetid)
* 20 bits start of reset another reset sequence*/
initial_dp->seq_out(0x1a0, 12);
uint32_t idcode = 0;
volatile uint32_t target_id;
volatile uint32_t target_id = 0;
bool scan_multidrop = true;
if (!targetid || !initial_dp->dp_low_write) {
/* No targetID given on the command line or probe can not