More sonarlint work

This commit is contained in:
Jasmine Iwanek
2023-06-09 23:46:54 -04:00
parent 0d1d069af4
commit ee695e71f9
218 changed files with 6282 additions and 3845 deletions

View File

@@ -463,7 +463,7 @@ kbc_at_poll_at(atkbc_t *dev)
case STATE_KBC_AMI_OUT:
if (dev->status & STAT_OFULL)
break;
/* FALLTHROUGH */
[[fallthrough]];
case STATE_MAIN_IBF:
default:
at_main_ibf:
@@ -586,7 +586,7 @@ kbc_at_poll_ps2(atkbc_t *dev)
case STATE_KBC_AMI_OUT:
if (dev->status & STAT_OFULL)
break;
/* FALLTHROUGH */
[[fallthrough]];
case STATE_MAIN_IBF:
default:
ps2_main_ibf:
@@ -1027,6 +1027,9 @@ write64_generic(void *priv, uint8_t val)
kbc_at_log("ATkbc: pulse %01X\n", val & 0x0f);
pulse_output(dev, val & 0x0f);
return 0;
default:
break;
}
kbc_at_log("ATkbc: bad command %02X\n", val);
@@ -1328,12 +1331,13 @@ write64_siemens(void *priv, uint8_t val)
static uint8_t
write60_quadtel(void *priv, UNUSED(uint8_t val))
{
atkbc_t *dev = (atkbc_t *) priv;
const atkbc_t *dev = (atkbc_t *) priv;
switch (dev->command) {
case 0xcf: /*??? - sent by MegaPC BIOS*/
kbc_at_log("ATkbc: ??? - sent by MegaPC BIOS\n");
return 0;
default:
break;
}

View File

@@ -135,7 +135,7 @@ kbc_at_dev_poll(void *priv)
dev->port->wantcmd = 0;
break;
}
/* FALLTHROUGH */
[[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)) {

View File

@@ -226,7 +226,6 @@ lt_read(uint16_t port, void *priv)
return (dev->control_val | 0x0F) & ~IRQ_MASK;
else
return 0xff;
break;
default:
break;

View File

@@ -507,7 +507,7 @@ sermouse_command_timer(void *priv)
break;
case PHASE_ACK:
serial_write_fifo(dev->serial, 0x06);
/* FALLTHROUGH */
[[fallthrough]];
case PHASE_BAUD_RATE:
sermouse_command_phase_idle(dev);
sermouse_timer_on(dev, dev->report_period, 1);
@@ -645,7 +645,7 @@ ltsermouse_write(UNUSED(struct serial_s *serial), void *priv, uint8_t data)
switch (data) {
default:
mouse_serial_log("Serial mouse: Invalid period %02X, using 1200 bps\n", data);
/*FALLTHROUGH*/
[[fallthrough]];
case 0x6E:
dev->transmit_period = sermouse_transmit_period(dev, 1200, -1);
break;

View File

@@ -193,7 +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 */
/* fall-through */
[[fallthrough]];
default: /* unknown */
dev->next_stat = 0x20; /* raise DEV_ERR */

View File

@@ -195,7 +195,7 @@ smbus_piix4_write(uint16_t addr, uint8_t val, void *priv)
timer_bytes++;
}
/* fall-through */
[[fallthrough]];
case 0xc: /* I2C process call */
if (!read) { /* word write (only when writing) */
@@ -214,7 +214,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 */
/* fall-through */
[[fallthrough]];
case 0xd: /* I2C block R/W */
i2c_write(i2c_smbus, smbus_addr, dev->cmd);
@@ -247,7 +247,7 @@ smbus_piix4_write(uint16_t addr, uint8_t val, void *priv)
i2c_write(i2c_smbus, smbus_addr, dev->cmd);
timer_bytes++;
/* fall-through */
[[fallthrough]];
case 0xe: /* I2C with 7-bit address */
if (!read) { /* word write (only when writing) */