Avoid a couple of warnings. (PR #1180)

This commit is contained in:
Andrea 2023-02-17 17:18:29 +00:00 committed by GitHub
parent b0220169b8
commit fb11c74d62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -728,7 +728,9 @@ void CpuSetupBenchmark ()
if ((++opcode >= BENCHOPCODES) || ((addr & 0x0F) >= 0x0B))
{
*(mem+addr++) = 0x4C;
*(mem+addr++) = (opcode >= BENCHOPCODES) ? 0x00 : ((addr >> 4)+1) << 4;
// split in 2 lines to avoid -Wunsequenced and undefined behvaiour
const BYTE value = (opcode >= BENCHOPCODES) ? 0x00 : ((addr >> 4)+1) << 4;
*(mem+addr++) = value;
*(mem+addr++) = 0x03;
while (addr & 0x0F)
++addr;

View File

@ -542,7 +542,7 @@ int ParseSymbolTable(const std::string & pPathFileName, SymbolTable_Index_e eSym
{
bool bFileDisplayed = false;
const int nMaxLen = MIN(DISASM_DISPLAY_MAX_TARGET_LEN, MAX_SYMBOLS_LEN);
const int nMaxLen = std::min<int>(DISASM_DISPLAY_MAX_TARGET_LEN, MAX_SYMBOLS_LEN);
int nSymbolsLoaded = 0;