Some code smell fixes from sonarlint
This commit is contained in:
@@ -104,15 +104,15 @@ stpc_log(const char *fmt, ...)
|
||||
static void
|
||||
stpc_recalcmapping(stpc_t *dev)
|
||||
{
|
||||
uint8_t reg, bitpair;
|
||||
uint32_t base, size;
|
||||
uint32_t base;
|
||||
uint32_t size;
|
||||
int state;
|
||||
|
||||
shadowbios = 0;
|
||||
shadowbios_write = 0;
|
||||
|
||||
for (reg = 0; reg <= 3; reg++) {
|
||||
for (bitpair = 0; bitpair <= ((reg == 3) ? 0 : 3); bitpair++) {
|
||||
for (uint8_t reg = 0; reg <= 3; reg++) {
|
||||
for (uint8_t bitpair = 0; bitpair <= ((reg == 3) ? 0 : 3); bitpair++) {
|
||||
if (reg == 3) {
|
||||
size = 0x10000;
|
||||
base = 0xf0000;
|
||||
@@ -271,7 +271,8 @@ stpc_nb_read(int func, int addr, void *priv)
|
||||
static void
|
||||
stpc_ide_handlers(stpc_t *dev, int bus)
|
||||
{
|
||||
uint16_t main, side;
|
||||
uint16_t main;
|
||||
uint16_t side;
|
||||
|
||||
if (bus & 0x01) {
|
||||
ide_pri_disable();
|
||||
@@ -607,8 +608,10 @@ stpc_serial_handlers(uint8_t val)
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint16_t uart0_io = 0x3f8, uart1_io = 0x3f8;
|
||||
uint8_t uart0_irq = 4, uart1_irq = 3;
|
||||
uint16_t uart0_io = 0x3f8;
|
||||
uint16_t uart1_io = 0x3f8;
|
||||
uint8_t uart0_irq = 4;
|
||||
uint8_t uart1_irq = 3;
|
||||
|
||||
if (val & 0x10)
|
||||
uart1_io &= 0xfeff;
|
||||
@@ -972,7 +975,8 @@ stpc_serial_init(const device_t *info)
|
||||
static void
|
||||
stpc_lpt_handlers(stpc_lpt_t *dev, uint8_t val)
|
||||
{
|
||||
uint8_t old_addr = (dev->reg1 & 0x03), new_addr = (val & 0x03);
|
||||
uint8_t old_addr = (dev->reg1 & 0x03);
|
||||
uint8_t new_addr = (val & 0x03);
|
||||
|
||||
switch (old_addr) {
|
||||
case 0x1:
|
||||
|
||||
Reference in New Issue
Block a user