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 #ifdef DEBUGGER_SUPPORT
const Thumbulator::Stats& stats() const { return myStats; } const Thumbulator::Stats& stats() const { return myStats; }
const Thumbulator::Stats& prevStats() const { return myPrevStats; } const Thumbulator::Stats& prevStats() const { return myPrevStats; }
const uInt32 cycles() const { return myCycles; } uInt32 cycles() const { return myCycles; }
const uInt32 prevCycles() const { return myPrevCycles; } uInt32 prevCycles() const { return myPrevCycles; }
#endif #endif
void incCycles(bool enable); void incCycles(bool enable);

View File

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

View File

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