]> git.sur5r.net Git - openocd/commitdiff
usb_blaster: fix warning: array subscript has type ‘char’
authorSpencer Oliver <spen@spen-soft.co.uk>
Wed, 9 Apr 2014 14:08:30 +0000 (15:08 +0100)
committerPaul Fertser <fercerpav@gmail.com>
Mon, 14 Apr 2014 18:19:56 +0000 (18:19 +0000)
caught by clang 3.4 running on cygwin.

Change-Id: I59f652337334e557fb50374f5270ba9c30392b6e
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/2100
Reviewed-by: Jörg Wunsch <openocd@uriah.heep.sax.de>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Tested-by: jenkins
src/jtag/drivers/usb_blaster/usb_blaster.c

index 5335ce4e9ed8136fa6d279d135bba7c5652e143e..d64a7ea827a3cbe3adff2f09897bc9c13c99022f 100644 (file)
@@ -952,7 +952,7 @@ COMMAND_HANDLER(ublast_handle_pin_command)
 
                if (strlen(pin_value) > 1)
                        val = '?';
-               switch (tolower(val)) {
+               switch (tolower((unsigned char)val)) {
                case '0':
                        *steer = FIXED_0;
                        break;