Fix variable initializtion warnings

This commit is contained in:
Alexander Babikov
2022-04-14 07:01:52 +05:00
parent 4e82d93729
commit 911821434e
4 changed files with 4 additions and 4 deletions

View File

@@ -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 */

View File

@@ -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. */

View File

@@ -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<char*>(config->name), config->default_int);

View File

@@ -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;