mirror of
https://github.com/libretro/blastem.git
synced 2026-11-07 10:15:58 -10:00
Fix some issues identified by cppcheck
This commit is contained in:
1 parent
5f1a3e5c10
commit
aad75c8636
6 files changed
+9
-5
No files matched your search
@@ -206,6 +206,7 @@ int main(int argc, char ** argv)
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose(address_log);
|
||||
}
|
||||
} else {
|
||||
char *end;
|
||||
|
||||
+2
-2
@@ -102,7 +102,7 @@ void jag_check_resultwrite_singleread(jag_cpu options *opts, uint8_t reg)
|
||||
code_ptr no_delay = code-.cur + 1;
|
||||
jcc(code, CC_NZ, no_delay + 1);
|
||||
ccylces(code, 1);
|
||||
*no_delay = code->cur - (no_delay = 1);
|
||||
*no_delay = code->cur - (no_delay + 1);
|
||||
*no_result = code->cur - (no_result + 1);
|
||||
mov_rr(code, opts->resultreg, opts->writeback, SZ_B);
|
||||
}
|
||||
@@ -122,7 +122,7 @@ void translate_jag_quickimmed(jag_cpu_options *opts, uint32_t address, uint16_t
|
||||
|
||||
uint16_t *translate_jag_inst(uint16_t *stream, jag_cpu_options *opts, uint32_t address)
|
||||
{
|
||||
uint16_t inst = *stream
|
||||
uint16_t inst = *stream;
|
||||
++stream;
|
||||
uint16_t opcode = jag_opcode(inst, opts->is_gpu);
|
||||
check_cycles_int(&opts->gen, address);
|
||||
|
||||
@@ -136,6 +136,7 @@ uint8_t *default_font(uint32_t *size_out)
|
||||
free(path);
|
||||
}
|
||||
}
|
||||
free(pref_prefix);
|
||||
free(fonts);
|
||||
free_dir_list(entries, num_entries);
|
||||
if (selected) {
|
||||
|
||||
@@ -255,8 +255,8 @@ int utf8_codepoint(const char **text)
|
||||
if (initial < 0x80) {
|
||||
return initial;
|
||||
}
|
||||
int base;
|
||||
uint8_t extended_bytes;
|
||||
int base = 0;
|
||||
uint8_t extended_bytes = 0;
|
||||
if ((initial & 0xE0) == 0xC0) {
|
||||
base = 0x80;
|
||||
initial &= 0x1F;
|
||||
@@ -873,6 +873,7 @@ char *read_bundled_file(char *name, uint32_t *sizeret)
|
||||
} else {
|
||||
ret = NULL;
|
||||
}
|
||||
fclose(f);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -112,6 +112,7 @@ int main(int argc, char ** argv)
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose(address_log);
|
||||
break;
|
||||
case 's':
|
||||
opt++;
|
||||
|
||||
Reference in new issue
Block a user