From 79a859413038c85f084ec1e91c90d2a85344ea2f Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Sun, 24 Feb 2019 18:19:44 +0100 Subject: [PATCH] stlink: remove unused assignment Fix a warning identified by clang 7.0.1: stlink_usb.c:1092:3: warning: Value stored to 'p' is never read p += sprintf(p, "S%d", swim); ^ ~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: Ic9da57e19ceecb0e3d65d3ea3412a05e1c2c779a Signed-off-by: Antonio Borneo Reviewed-on: http://openocd.zylin.com/4945 Tested-by: jenkins Reviewed-by: Tomas Vanek --- src/jtag/drivers/stlink_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jtag/drivers/stlink_usb.c b/src/jtag/drivers/stlink_usb.c index 1a3cc6154..a9ee44d92 100644 --- a/src/jtag/drivers/stlink_usb.c +++ b/src/jtag/drivers/stlink_usb.c @@ -1002,7 +1002,7 @@ static int stlink_usb_version(void *handle) if (bridge) p += sprintf(p, "B%d", bridge); if (swim || !msd) - p += sprintf(p, "S%d", swim); + sprintf(p, "S%d", swim); LOG_INFO("STLINK %s (API v%d) VID:PID %04X:%04X", v_str,