stlink: remove unused assignment 45/4945/2
authorAntonio Borneo <borneo.antonio@gmail.com>
Sun, 24 Feb 2019 17:19:44 +0000 (18:19 +0100)
committerTomas Vanek <vanekt@fbl.cz>
Wed, 6 Mar 2019 15:36:14 +0000 (15:36 +0000)
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 <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4945
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
src/jtag/drivers/stlink_usb.c

index 1a3cc61..a9ee44d 100644 (file)
@@ -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,