Next round of sonarlint cleanups

This commit is contained in:
Jasmine Iwanek
2023-06-26 22:31:03 -04:00
parent b3bd55da17
commit 922c4335ae
90 changed files with 1455 additions and 1023 deletions

View File

@@ -133,16 +133,26 @@ static const uint8_t periods[4] = { 30, 50, 100, 200 };
/* Our mouse device. */
typedef struct mouse {
uint8_t current_b, control_val,
config_val, sig_val,
command_val, pad;
uint8_t current_b;
uint8_t control_val;
uint8_t config_val;
uint8_t sig_val;
uint8_t command_val;
uint8_t pad;
int8_t current_x, current_y;
int8_t current_x;
int8_t current_y;
int base, irq, bn, flags,
mouse_delayed_dx, mouse_delayed_dy,
mouse_buttons, mouse_buttons_last,
toggle_counter, timer_enabled;
int base;
int irq;
int bn;
int flags;
int mouse_delayed_dx;
int mouse_delayed_dy;
int mouse_buttons;
int mouse_buttons_last;
int toggle_counter;
int timer_enabled;
double period;
pc_timer_t timer; /* mouse event timer */
@@ -217,6 +227,7 @@ lt_read(uint16_t port, void *priv)
else
return 0xff;
break;
default:
break;
}
@@ -252,6 +263,7 @@ ms_read(uint16_t port, void *priv)
case INP_CTRL_COMMAND:
value = dev->control_val;
break;
default:
bm_log("ERROR: Reading data port in unsupported mode 0x%02x\n", dev->control_val);
}
@@ -266,6 +278,7 @@ ms_read(uint16_t port, void *priv)
case INP_PORT_CONFIG:
bm_log("ERROR: Unsupported read from port 0x%04x\n", port);
break;
default:
break;
}
@@ -388,6 +401,7 @@ ms_write(uint16_t port, uint8_t val, void *priv)
case INP_CTRL_READ_Y:
dev->command_val = val & 0x07;
break;
default:
bm_log("ERROR: Unsupported command written to port 0x%04x (value = 0x%02x)\n", port, val);
}
@@ -437,6 +451,7 @@ ms_write(uint16_t port, uint8_t val, void *priv)
dev->control_val &= INP_PERIOD_MASK;
dev->control_val |= (val & ~INP_PERIOD_MASK);
return;
default:
bm_log("ERROR: Unsupported period written to port 0x%04x (value = 0x%02x)\n", port, val);
}
@@ -444,6 +459,7 @@ ms_write(uint16_t port, uint8_t val, void *priv)
dev->control_val = val;
break;
default:
bm_log("ERROR: Unsupported write to port 0x%04x (value = 0x%02x)\n", port, val);
}