summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomek CEDRO <cederom@tlen.pl>2011-11-03 03:31:55 +0100
committerTomek CEDRO <cederom@tlen.pl>2011-11-03 03:31:55 +0100
commit5d773f63136a86bd72ebb2862ca90766f945418b (patch)
treeb696e545df5e29821ca894c7dc7f78cb751c13c3
parentc06e0b49f4fde00e71f5c2be57bbcfbfe09079e0 (diff)
downloadopenocd+libswd-5d773f63136a86bd72ebb2862ca90766f945418b.tar.gz
openocd+libswd-5d773f63136a86bd72ebb2862ca90766f945418b.tar.bz2
openocd+libswd-5d773f63136a86bd72ebb2862ca90766f945418b.tar.xz
openocd+libswd-5d773f63136a86bd72ebb2862ca90766f945418b.zip
transport/swd_drv: Fixed [-Werror=unused-but-set-variable] build error on ubuntu 11.10.
-rw-r--r--src/transport/swd_libswd_drv_openocd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/transport/swd_libswd_drv_openocd.c b/src/transport/swd_libswd_drv_openocd.c
index 49a1f946..a357bad3 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;
}