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

@@ -238,6 +238,9 @@ completion_code(uint8_t *sense)
case ASC_MEDIUM_NOT_PRESENT:
ret = 0xaa;
break;
default:
break;
}
return ret;
@@ -483,6 +486,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);
[[fallthrough]];
case 0x05: /* Format Track, invalid since SCSI has no tracks */
case 0x0a: /* ???? */
case 0x0b: /* ???? */
@@ -605,7 +609,9 @@ static void
x54x_mbi(x54x_t *dev)
{
Req_t *req = &dev->Req;
// uint32_t CCBPointer = req->CCBPointer;
#if 0
uint32_t CCBPointer = req->CCBPointer;
#endif
addr24_t CCBPointer;
CCBU *CmdBlock = &(req->CmdBlock);
uint8_t HostStatus = req->HostStatus;
@@ -1035,7 +1041,7 @@ x54x_notify(x54x_t *dev)
}
static void
x54x_req_setup(x54x_t *dev, uint32_t CCBPointer, Mailbox32_t *Mailbox32)
x54x_req_setup(x54x_t *dev, uint32_t CCBPointer, UNUSED(Mailbox32_t *Mailbox32))
{
Req_t *req = &dev->Req;
uint8_t id;
@@ -1161,9 +1167,11 @@ x54x_mbo_process(x54x_t *dev)
} else if (!dev->MailboxIsBIOS && (mb32.u.out.ActionCode == MBO_ABORT)) {
x54x_log("Abort Mailbox Command\n");
x54x_req_abort(dev, mb32.CCBPointer);
} /* else {
#if 0
} else {
x54x_log("Invalid action code: %02X\n", mb32.u.out.ActionCode);
} */
#endif
}
if ((mb32.u.out.ActionCode == MBO_START) || (!dev->MailboxIsBIOS && (mb32.u.out.ActionCode == MBO_ABORT))) {
/* We got the mailbox, decrease the number of pending requests. */
@@ -1282,7 +1290,9 @@ x54x_cmd_callback(void *priv)
period = (1000000.0 / dev->ha_bps) * ((double) dev->temp_period);
timer_on(&dev->timer, dev->media_period + period + 10.0, 0);
// x54x_log("Temporary period: %lf us (%" PRIi64 " periods)\n", dev->timer.period, dev->temp_period);
#if 0
x54x_log("Temporary period: %lf us (%" PRIi64 " periods)\n", dev->timer.period, dev->temp_period);
#endif
}
static uint8_t
@@ -1292,8 +1302,8 @@ x54x_in(uint16_t port, void *priv)
uint8_t ret;
switch (port & 3) {
case 0:
default:
case 0:
ret = dev->Status;
break;
@@ -1329,8 +1339,8 @@ x54x_in(uint16_t port, void *priv)
ret = dev->Geometry;
else {
switch (dev->Geometry) {
case 0:
default:
case 0:
ret = 'A';
break;
case 1: