Fix minor warnings from g++10.3.

This commit is contained in:
Stephen Anthony 2021-06-25 15:40:06 -02:30
parent 478d13e165
commit 135ee8748d
3 changed files with 11 additions and 3 deletions

View File

@ -71,8 +71,8 @@ class CartridgeARM : public Cartridge
#ifdef DEBUGGER_SUPPORT
const Thumbulator::Stats& stats() const { return myStats; }
const Thumbulator::Stats& prevStats() const { return myPrevStats; }
const uInt32 cycles() const { return myCycles; }
const uInt32 prevCycles() const { return myPrevCycles; }
uInt32 cycles() const { return myCycles; }
uInt32 prevCycles() const { return myPrevCycles; }
#endif
void incCycles(bool enable);

View File

@ -243,9 +243,13 @@ uInt32 Thumbulator::fetch16(uInt32 addr)
#ifdef THUMB_CYCLE_COUNT
if(_fetchCycleType == CycleType::S)
{
INC_S_CYCLES(addr, AccessType::prefetch);
}
else
{
INC_N_CYCLES(addr, AccessType::prefetch);
}
_fetchCycleType = CycleType::S;
#endif
@ -2689,6 +2693,10 @@ int Thumbulator::execute()
return 0;
}
// Silence compiler
case Op::numOps:
break;
#ifndef UNSAFE_OPTIMIZATIONS
case Op::invalid:
break;

View File

@ -107,7 +107,7 @@ class Thumbulator
string run(uInt32& cycles, bool irqDrivenAudio);
void enableCycleCount(bool enable) { _countCycles = enable; }
const Stats& stats() const { return _stats; }
const uInt32 cycles() const { return _totalCycles; }
uInt32 cycles() const { return _totalCycles; }
void setChipType(ChipType type);
void setMamMode(MamModeType mode) { mamcr = mode; }
void lockMamMode(bool lock) { _lockMamcr = lock; }