Fix fallthrough warnings on gcc 7

This commit is contained in:
Gareth McMullin 2017-10-09 11:07:29 +13:00
parent 231d42d581
commit 9a5b31c37b
2 changed files with 4 additions and 4 deletions

View File

@ -155,7 +155,7 @@ int gdb_main_loop(struct target_controller *tc, bool in_syscall)
}
case 's': /* 's [addr]': Single step [start at addr] */
single_step = true;
// Fall through to resume target
/* fall through */
case 'c': /* 'c [addr]': Continue [at addr] */
if(!cur_target) {
gdb_putpacketz("X1D");
@ -165,7 +165,7 @@ int gdb_main_loop(struct target_controller *tc, bool in_syscall)
target_halt_resume(cur_target, single_step);
SET_RUN_STATE(1);
single_step = false;
// Fall through to wait for target halt
/* fall through */
case '?': { /* '?': Request reason for target halt */
/* This packet isn't documented as being mandatory,
* but GDB doesn't work without it. */
@ -482,4 +482,3 @@ void gdb_main(void)
{
gdb_main_loop(&gdb_controller, false);
}

View File

@ -445,6 +445,7 @@ static int cdcacm_control_request(usbd_device *dev,
switch(req->wIndex) {
case 2:
usbuart_set_line_coding((struct usb_cdc_line_coding*)*buf);
return 1;
case 0:
return 1; /* Ignore on GDB Port */
default:
@ -462,6 +463,7 @@ static int cdcacm_control_request(usbd_device *dev,
return 1;
}
return 0;
case DFU_DETACH:
if(req->wIndex == DFU_IF_NO) {
*complete = dfu_detach_complete;
@ -561,4 +563,3 @@ void USB_ISR(void)
{
usbd_poll(usbdev);
}