Avoid a couple of warnings.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
Andrea Odetti 2023-02-11 17:18:04 +00:00
parent b0220169b8
commit bb05e9a92d
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;