diff --git a/src/mem/rom.c b/src/mem/rom.c index 5300e47a0..a4c30be99 100644 --- a/src/mem/rom.c +++ b/src/mem/rom.c @@ -94,7 +94,7 @@ rom_fopen(char *fn, char *mode) { char temp[1024]; rom_path_t *rom_path = &rom_paths; - FILE *fp; + FILE *fp = NULL; if (strstr(fn, "roms/") == fn) { /* Relative path */ diff --git a/src/mem/spd.c b/src/mem/spd.c index 96df99867..aab1511d6 100644 --- a/src/mem/spd.c +++ b/src/mem/spd.c @@ -405,7 +405,7 @@ void spd_write_drbs_with_ext(uint8_t *regs, uint8_t reg_min, uint8_t reg_max, uint8_t drb_unit) { uint8_t row, dimm, drb; - uint16_t size, row_val, rows[SPD_MAX_SLOTS]; + uint16_t size, row_val = 0, rows[SPD_MAX_SLOTS]; int shift; /* No SPD: split SIMMs into pairs as if they were "DIMM"s. */ diff --git a/src/qt/qt_deviceconfig.cpp b/src/qt/qt_deviceconfig.cpp index 3ea8cc0ab..0b2047785 100644 --- a/src/qt/qt_deviceconfig.cpp +++ b/src/qt/qt_deviceconfig.cpp @@ -117,7 +117,7 @@ void DeviceConfig::ConfigureDevice(const _device_* device, int instance, Setting cbox->setObjectName(config->name); auto* model = cbox->model(); int currentIndex = -1; - int selected; + int selected = 0; switch (config->type) { case CONFIG_SELECTION: selected = config_get_int(device_context.name, const_cast(config->name), config->default_int); diff --git a/src/video/vid_ati_mach64.c b/src/video/vid_ati_mach64.c index 3cfc22db3..3caa710e7 100644 --- a/src/video/vid_ati_mach64.c +++ b/src/video/vid_ati_mach64.c @@ -1283,7 +1283,7 @@ void mach64_blit(uint32_t cpu_dat, int count, mach64_t *mach64) case OP_RECT: while (count) { - uint32_t src_dat, dest_dat; + uint32_t src_dat = 0, dest_dat; uint32_t host_dat = 0; uint32_t old_dest_dat; int mix = 0;