mirror of https://github.com/TomHarte/CLK.git
Fix two more not-really-an-issue warnings.
This commit is contained in:
parent
56b65780d2
commit
becb6ce2e0
|
@ -337,7 +337,7 @@ struct Executor {
|
||||||
uint32_t value = 0;
|
uint32_t value = 0;
|
||||||
|
|
||||||
if constexpr (flags.transfer_byte()) {
|
if constexpr (flags.transfer_byte()) {
|
||||||
uint8_t target;
|
uint8_t target = 0; // Value should never be used; this avoids a spurious GCC warning.
|
||||||
did_read = bus.template read<uint8_t>(address, target, registers_.mode(), trans);
|
did_read = bus.template read<uint8_t>(address, target, registers_.mode(), trans);
|
||||||
if(did_read) {
|
if(did_read) {
|
||||||
value = target;
|
value = target;
|
||||||
|
|
|
@ -548,7 +548,7 @@ class ConcreteMachine:
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t advance_pipeline(uint32_t pc) {
|
uint32_t advance_pipeline(uint32_t pc) {
|
||||||
uint32_t instruction;
|
uint32_t instruction = 0; // Value should never be used; this avoids a spurious GCC warning.
|
||||||
const bool did_read = executor_.bus.read(pc, instruction, executor_.registers().mode(), false);
|
const bool did_read = executor_.bus.read(pc, instruction, executor_.registers().mode(), false);
|
||||||
return pipeline_.exchange(
|
return pipeline_.exchange(
|
||||||
did_read ? instruction : Pipeline::SWI,
|
did_read ? instruction : Pipeline::SWI,
|
||||||
|
|
Loading…
Reference in New Issue