Fix implicit-fallthrough Warnings using gcc directive /* Falls through. */

Signed-off-by: Marcos Chaparro <mchaparro@paltatech.com>
This commit is contained in:
Marcos Chaparro 2019-01-10 20:03:48 -03:00
parent 95d8f70f87
commit 09ff1f1f8c
2 changed files with 5 additions and 4 deletions

View File

@ -757,7 +757,7 @@ void _usb_ep0in(USBDriver *usbp, usbep_t ep) {
usbp->ep0state = USB_EP0_WAITING_TX0;
return;
}
/* Falls into, it is intentional.*/
/* Falls through. */
case USB_EP0_WAITING_TX0:
/* Transmit phase over, receiving the zero sized status packet.*/
usbp->ep0state = USB_EP0_WAITING_STS;
@ -782,7 +782,7 @@ void _usb_ep0in(USBDriver *usbp, usbep_t ep) {
case USB_EP0_RX:
/* All the above are invalid states in the IN phase.*/
osalDbgAssert(false, "EP0 state machine error");
/* Falling through is intentional.*/
/* Falls through. */
case USB_EP0_ERROR:
/* Error response, the state machine goes into an error state, the low
level layer will have to reset it to USB_EP0_WAITING_SETUP after
@ -842,7 +842,7 @@ void _usb_ep0out(USBDriver *usbp, usbep_t ep) {
case USB_EP0_SENDING_STS:
/* All the above are invalid states in the IN phase.*/
osalDbgAssert(false, "EP0 state machine error");
/* Falling through is intentional.*/
/* Falls through. */
case USB_EP0_ERROR:
/* Error response, the state machine goes into an error state, the low
level layer will have to reset it to USB_EP0_WAITING_SETUP after

View File

@ -288,11 +288,12 @@ static void wakeup(void *p) {
#if CH_CFG_USE_SEMAPHORES == TRUE
case CH_STATE_WTSEM:
chSemFastSignalI(tp->p_u.wtsemp);
/* Falls into, intentional. */
#endif
#if (CH_CFG_USE_CONDVARS == TRUE) && (CH_CFG_USE_CONDVARS_TIMEOUT == TRUE)
/* Falls through. */
case CH_STATE_WTCOND:
#endif
/* Falls through. */
case CH_STATE_QUEUED:
/* States requiring dequeuing.*/
(void) queue_dequeue(tp);