dsp5680xx - mark erase after unlocking flash
[fw/openocd] / src / target / arm_adi_v5.c
index 21dc54cd3d2ccd7ddf779690ba5b2f857fb08fe6..9ea7b5a145ea7f27b8ac8734e5d0cbeb6c24ffc5 100644 (file)
@@ -1122,9 +1122,7 @@ int dap_syssec(struct adiv5_dap *dap)
 
                while (tap != NULL)
                {
-                       if (!tap->hasidcode)
-                               continue;
-                       if ( dap_syssec_filter_data[i].idcode == tap->idcode )
+                       if ( tap->hasidcode && (dap_syssec_filter_data[i].idcode == tap->idcode) )
                        {
                                LOG_DEBUG("DAP: mdmap_init for idcode: %08x",tap->idcode);
                                dap_syssec_filter_data[i].dap_init(dap);
@@ -1354,7 +1352,7 @@ static int dap_info_command(struct command_context *cmd_ctx,
                struct adiv5_dap *dap, int ap)
 {
        int retval;
-       uint32_t dbgbase, apid;
+       uint32_t dbgbase = 0, apid = 0; /* Silence gcc by initializing */
        int romtable_present = 0;
        uint8_t mem_ap;
        uint32_t ap_old;