Better fallthrough annotation macro.
This commit is contained in:
@@ -468,9 +468,7 @@ kbc_at_poll_at(atkbc_t *dev)
|
||||
case STATE_KBC_AMI_OUT:
|
||||
if (dev->status & STAT_OFULL)
|
||||
break;
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
fallthrough;
|
||||
case STATE_MAIN_IBF:
|
||||
default:
|
||||
at_main_ibf:
|
||||
@@ -593,9 +591,7 @@ kbc_at_poll_ps2(atkbc_t *dev)
|
||||
case STATE_KBC_AMI_OUT:
|
||||
if (dev->status & STAT_OFULL)
|
||||
break;
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
fallthrough;
|
||||
case STATE_MAIN_IBF:
|
||||
default:
|
||||
ps2_main_ibf:
|
||||
|
||||
@@ -136,9 +136,7 @@ kbc_at_dev_poll(void *priv)
|
||||
dev->port->wantcmd = 0;
|
||||
break;
|
||||
}
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
fallthrough;
|
||||
case DEV_STATE_MAIN_WANT_IN:
|
||||
/* Output command response and then return to main loop #2. */
|
||||
if ((dev->port->out_new == -1) && (dev->cmd_queue_start != dev->cmd_queue_end)) {
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
#include <86box/serial.h>
|
||||
#include <86box/mouse.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
#define SERMOUSE_PORT 0 /* attach to Serial0 */
|
||||
|
||||
@@ -672,9 +670,7 @@ ltsermouse_process_command(mouse_t *dev)
|
||||
case 0x41:
|
||||
/* Absolute Bit Pad One Packed Binary Format */
|
||||
dev->abs_x = dev->abs_y = 0;
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
fallthrough;
|
||||
case 0x42: /* Relative Bit Pad One Packed Binary Format */
|
||||
case 0x53: /* MM Series Data Format */
|
||||
case 0x54: /* Three Byte Packed Binary Format */
|
||||
@@ -759,9 +755,7 @@ ltsermouse_process_data(mouse_t *dev)
|
||||
switch (dev->ib) {
|
||||
default:
|
||||
mouse_serial_log("Serial mouse: Invalid period %02X, using 1200 bps\n", data);
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
fallthrough;
|
||||
case 0x6e:
|
||||
dev->bps = 1200;
|
||||
break;
|
||||
@@ -870,14 +864,10 @@ ltsermouse_write(UNUSED(struct serial_s *serial), void *priv, uint8_t data)
|
||||
case STATE_TRANSMIT:
|
||||
case STATE_SKIP_REPORT:
|
||||
sermouse_set_period(dev, 0.0);
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
fallthrough;
|
||||
default:
|
||||
dev->state = STATE_COMMAND;
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
fallthrough;
|
||||
case STATE_DATA:
|
||||
sermouse_timer(dev);
|
||||
break;
|
||||
|
||||
@@ -193,10 +193,7 @@ smbus_ali7101_write(uint16_t addr, uint8_t val, void *priv)
|
||||
|
||||
case 0x4: /* block R/W */
|
||||
timer_bytes++; /* count the SMBus length byte now */
|
||||
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
fallthrough;
|
||||
|
||||
default: /* unknown */
|
||||
dev->next_stat = 0x20; /* raise DEV_ERR */
|
||||
|
||||
@@ -195,10 +195,7 @@ smbus_piix4_write(uint16_t addr, uint8_t val, void *priv)
|
||||
i2c_write(i2c_smbus, smbus_addr, dev->cmd);
|
||||
timer_bytes++;
|
||||
}
|
||||
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
fallthrough;
|
||||
|
||||
case 0xc: /* I2C process call */
|
||||
if (!read) { /* word write (only when writing) */
|
||||
@@ -216,10 +213,7 @@ smbus_piix4_write(uint16_t addr, uint8_t val, void *priv)
|
||||
|
||||
case 0x5: /* block R/W */
|
||||
timer_bytes++; /* count the SMBus length byte now */
|
||||
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
fallthrough;
|
||||
|
||||
case 0xd: /* I2C block R/W */
|
||||
i2c_write(i2c_smbus, smbus_addr, dev->cmd);
|
||||
@@ -251,10 +245,7 @@ smbus_piix4_write(uint16_t addr, uint8_t val, void *priv)
|
||||
/* command write */
|
||||
i2c_write(i2c_smbus, smbus_addr, dev->cmd);
|
||||
timer_bytes++;
|
||||
|
||||
#ifdef FALLTHROUGH_ANNOTATION
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
fallthrough;
|
||||
|
||||
case 0xe: /* I2C with 7-bit address */
|
||||
if (!read) { /* word write (only when writing) */
|
||||
|
||||
Reference in New Issue
Block a user