Better fallthrough annotation macro.

This commit is contained in:
Jasmine Iwanek
2023-08-09 19:44:56 -04:00
parent 2c5240e07f
commit 81bb5e564b
50 changed files with 94 additions and 239 deletions

View File

@@ -1232,9 +1232,7 @@ BuslogicPCIWrite(UNUSED(int func), int addr, uint8_t val, void *priv)
case 0x10:
val &= 0xe0;
val |= 1;
#ifdef FALLTHROUGH_ANNOTATION
[[fallthrough]];
#endif
fallthrough;
case 0x11:
case 0x12:
@@ -1258,9 +1256,7 @@ BuslogicPCIWrite(UNUSED(int func), int addr, uint8_t val, void *priv)
case 0x14:
val &= 0xe0;
#ifdef FALLTHROUGH_ANNOTATION
[[fallthrough]];
#endif
fallthrough;
case 0x15:
case 0x16:

View File

@@ -883,9 +883,7 @@ scsi_cdrom_update_request_length(scsi_cdrom_t *dev, int len, int block_len)
break;
}
}
#ifdef FALLTHROUGH_ANNOTATION
[[fallthrough]];
#endif
fallthrough;
default:
dev->packet_len = len;
@@ -961,9 +959,7 @@ scsi_cdrom_command_common(scsi_cdrom_t *dev)
scsi_cdrom_log("CD-ROM %i: Seek period: %" PRIu64 " us\n",
dev->id, (uint64_t) period);
dev->callback += period;
#ifdef FALLTHROUGH_ANNOTATION
[[fallthrough]];
#endif
fallthrough;
case 0x25:
case 0x42:
case 0x43:
@@ -1940,9 +1936,7 @@ begin:
/* IMPORTANT: Convert the command to new read CD
for pass through purposes. */
dev->current_cdb[0] = GPCMD_READ_CD;
#ifdef FALLTHROUGH_ANNOTATION
[[fallthrough]];
#endif
fallthrough;
case GPCMD_READ_6:
case GPCMD_READ_10:

View File

@@ -597,9 +597,7 @@ scsi_disk_command(scsi_common_t *sc, uint8_t *cdb)
scsi_disk_invalid_field(dev);
return;
}
#ifdef FALLTHROUGH_ANNOTATION
[[fallthrough]];
#endif
fallthrough;
case GPCMD_SCSI_RESERVE:
case GPCMD_SCSI_RELEASE:
case GPCMD_TEST_UNIT_READY:

View File

@@ -1030,9 +1030,7 @@ esp_reg_write(esp_t *dev, uint32_t saddr, uint32_t val)
switch (saddr) {
case ESP_TCHI:
dev->tchi_written = 1;
#ifdef FALLTHROUGH_ANNOTATION
[[fallthrough]];
#endif
fallthrough;
case ESP_TCLO:
case ESP_TCMID:
esp_log("Transfer count regs %02x = %i\n", saddr, val);

View File

@@ -490,9 +490,7 @@ x54x_bios_command(x54x_t *x54x, uint8_t max_id, BIOSCMD *cmd, int8_t islba)
default:
x54x_log("BIOS: Unimplemented command: %02X\n", cmd->command);
#ifdef FALLTHROUGH_ANNOTATION
[[fallthrough]];
#endif
fallthrough;
case 0x05: /* Format Track, invalid since SCSI has no tracks */
case 0x0a: /* ???? */
case 0x0b: /* ???? */