diff options
-rw-r--r-- | src/target/arm_adi_v5.c | 6 | ||||
-rw-r--r-- | src/transport/swd_libswd_drv_openocd.c | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c index cacfac8f..88a5d3b8 100644 --- a/src/target/arm_adi_v5.c +++ b/src/target/arm_adi_v5.c @@ -695,7 +695,7 @@ int mem_ap_read_buf_u32(struct adiv5_dap *dap, uint8_t *buffer, // uint32_t invalue, adr = address; // uint8_t* pBuffer = buffer; - int i, retval; + int i, retval=ERROR_FAIL; uint32_t invalue; //count >>= 2; // wcount = count; @@ -1192,7 +1192,7 @@ int dap_get_debugbase(struct adiv5_dap *dap, int ap, { uint32_t ap_old; int retval; - uint32_t dbgbase, apid, idcode; + uint32_t dbgbase, apid; //, idcode; /* AP address is in bits 31:24 of DP_SELECT */ if (ap >= 256) @@ -1215,7 +1215,7 @@ int dap_get_debugbase(struct adiv5_dap *dap, int ap, struct jtag_tap *tap = dap->jtag_info->tap; while (tap != NULL) { if (tap->hasidcode) { - idcode = tap->idcode; + //idcode = tap->idcode; break; } tap = tap->next_tap; diff --git a/src/transport/swd_libswd_drv_openocd.c b/src/transport/swd_libswd_drv_openocd.c index f4005459..2066d5b3 100644 --- a/src/transport/swd_libswd_drv_openocd.c +++ b/src/transport/swd_libswd_drv_openocd.c @@ -266,11 +266,10 @@ int swd_log(swd_ctx_t *swdctx, swd_loglevel_t loglevel, char *msg, ...){ if (loglevel > SWD_LOGLEVEL_MAX) return SWD_ERROR_PARAM; if (loglevel > swdctx->config.loglevel) return SWD_OK; - int res; va_list ap; va_start(ap, msg); // Calling OpenOCD log functions here will cause program crash (va recurrent). - res=vprintf(msg, ap); + vprintf(msg, ap); va_end(ap); return SWD_OK; } |