From becb6ce2e027e9f02c46b22443c06df1c445b60d Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 23 Apr 2024 22:20:13 -0400 Subject: [PATCH] Fix two more not-really-an-issue warnings. --- InstructionSets/ARM/Executor.hpp | 2 +- Machines/Acorn/Archimedes/Archimedes.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/InstructionSets/ARM/Executor.hpp b/InstructionSets/ARM/Executor.hpp index af997a4d5..72c6770a3 100644 --- a/InstructionSets/ARM/Executor.hpp +++ b/InstructionSets/ARM/Executor.hpp @@ -337,7 +337,7 @@ struct Executor { uint32_t value = 0; 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(address, target, registers_.mode(), trans); if(did_read) { value = target; diff --git a/Machines/Acorn/Archimedes/Archimedes.cpp b/Machines/Acorn/Archimedes/Archimedes.cpp index 85dd4ddc4..b44dfecdc 100644 --- a/Machines/Acorn/Archimedes/Archimedes.cpp +++ b/Machines/Acorn/Archimedes/Archimedes.cpp @@ -548,7 +548,7 @@ class ConcreteMachine: } 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); return pipeline_.exchange( did_read ? instruction : Pipeline::SWI,