Linux: Fixed compilation warning

This commit is contained in:
Sour 2018-12-25 22:40:05 -05:00
parent 268bcd44fc
commit 071f69520b

View file

@ -128,6 +128,10 @@ void CPU::Exec()
void CPU::IRQ()
{
#ifndef DUMMYCPU
uint16_t originalPc = PC();
#endif
DummyRead(); //fetch opcode (and discard it - $00 (BRK) is forced into the opcode register instead)
DummyRead(); //read next instruction byte (actually the same as above, since PC increment is suppressed. Also discarded.)
Push((uint16_t)(PC()));
@ -136,7 +140,6 @@ void CPU::IRQ()
Push((uint8_t)(PS() | PSFlags::Reserved));
SetFlags(PSFlags::Interrupt);
uint16_t originalPc = PC();
SetPC(MemoryReadWord(CPU::NMIVector));
_state.NMIFlag = false;
@ -148,7 +151,6 @@ void CPU::IRQ()
Push((uint8_t)(PS() | PSFlags::Reserved));
SetFlags(PSFlags::Interrupt);
uint16_t originalPc = PC();
SetPC(MemoryReadWord(CPU::IRQVector));
#ifndef DUMMYCPU