jtag: usb_blaster: Add missing 'default' to switch statement 33/5333/2
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>
Sun, 27 Oct 2019 16:59:47 +0000 (11:59 -0500)
committerTomas Vanek <vanekt@fbl.cz>
Thu, 7 Nov 2019 08:21:19 +0000 (08:21 +0000)
If a new JTAG command is added, then GCC will complain that
enumeration value not handled in switch. This is the only driver not
to have a default case, so add it.

Change-Id: Icb838087bb7525d057a911bd256300e256da1668
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-on: http://openocd.zylin.com/5333
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
src/jtag/drivers/usb_blaster/usb_blaster.c

index 165ebdc..48534a2 100644 (file)
@@ -816,6 +816,11 @@ static int ublast_execute_queue(void)
                case JTAG_SCAN:
                        ret = ublast_scan(cmd->cmd.scan);
                        break;
+               default:
+                       LOG_ERROR("BUG: unknown JTAG command type 0x%X",
+                                 cmd->type);
+                       ret = ERROR_FAIL;
+                       break;
                }
        }