From 73131735fa44e35bf068e4889840f9aa64897043 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 30 May 2020 19:31:17 -0400 Subject: [PATCH] Further qmake warning corrections. --- Components/5380/ncr5380.cpp | 5 +++++ Components/8272/i8272.cpp | 4 ++++ Components/8272/i8272.hpp | 4 ++-- Components/DiskII/IWM.hpp | 5 +++-- Machines/Apple/AppleII/AppleII.cpp | 2 +- Machines/Electron/Video.hpp | 1 - Outputs/CRT/CRT.hpp | 2 -- Processors/6502/Implementation/6502Storage.hpp | 2 +- Processors/68000/Implementation/68000Storage.hpp | 4 ++-- Processors/68000/State/State.cpp | 2 +- Reflection/Struct.cpp | 2 +- Storage/Disk/DiskImage/Formats/STX.cpp | 4 ++-- Storage/Disk/Encodings/MFM/Encoder.cpp | 8 ++++---- Storage/Disk/Encodings/MFM/Encoder.hpp | 4 ++-- Storage/Tape/Parsers/Oric.hpp | 2 +- 15 files changed, 29 insertions(+), 22 deletions(-) diff --git a/Components/5380/ncr5380.cpp b/Components/5380/ncr5380.cpp index 81bb6883a..3fb2a9514 100644 --- a/Components/5380/ncr5380.cpp +++ b/Components/5380/ncr5380.cpp @@ -18,6 +18,11 @@ NCR5380::NCR5380(SCSI::Bus &bus, int clock_rate) : clock_rate_(clock_rate) { device_id_ = bus_.add_device(); bus_.add_observer(this); + + // TODO: use clock rate and expected phase. This implementation currently + // provides only CPU-driven polling behaviour. + (void)clock_rate_; + (void)expected_phase_; } void NCR5380::write(int address, uint8_t value, bool) { diff --git a/Components/8272/i8272.cpp b/Components/8272/i8272.cpp index 5c9c617b9..95e735984 100644 --- a/Components/8272/i8272.cpp +++ b/Components/8272/i8272.cpp @@ -80,6 +80,10 @@ i8272::i8272(BusHandler &bus_handler, Cycles clock_rate) : Storage::Disk::MFMController(clock_rate), bus_handler_(bus_handler) { posit_event(int(Event8272::CommandByte)); + + // TODO: implement DMA, etc. I have a vague intention to implement the IBM PC + // one day, that should help to force that stuff. + (void)bus_handler_; } ClockingHint::Preference i8272::preferred_clocking() const { diff --git a/Components/8272/i8272.hpp b/Components/8272/i8272.hpp index 6b8371883..76fc33ee3 100644 --- a/Components/8272/i8272.hpp +++ b/Components/8272/i8272.hpp @@ -46,8 +46,8 @@ class i8272 : public Storage::Disk::MFMController { virtual void select_drive(int number) = 0; private: - // The bus handler, for interrupt and DMA-driven usage. - BusHandler &bus_handler_; + // The bus handler, for interrupt and DMA-driven usage. [TODO] + BusHandler &bus_handler_; std::unique_ptr allocated_bus_handler_; // Status registers. diff --git a/Components/DiskII/IWM.hpp b/Components/DiskII/IWM.hpp index a5e391a30..ecb57f97a 100644 --- a/Components/DiskII/IWM.hpp +++ b/Components/DiskII/IWM.hpp @@ -82,8 +82,9 @@ class IWM: uint8_t data_register_ = 0; uint8_t mode_ = 0; - bool read_write_ready_ = true; - bool write_overran_ = false; + // These related to functionality not-yet implemented. + // bool read_write_ready_ = true; + // bool write_overran_ = false; int state_ = 0; diff --git a/Machines/Apple/AppleII/AppleII.cpp b/Machines/Apple/AppleII/AppleII.cpp index e57fca73a..34d8ad874 100644 --- a/Machines/Apple/AppleII/AppleII.cpp +++ b/Machines/Apple/AppleII/AppleII.cpp @@ -804,7 +804,7 @@ template class ConcreteMachine: m6502_.run_for(cycles); } - void reset_all_keys() final { + void reset_all_keys(Inputs::Keyboard *) final { open_apple_is_pressed_ = closed_apple_is_pressed_ = key_is_down_ = false; } diff --git a/Machines/Electron/Video.hpp b/Machines/Electron/Video.hpp index 137dca0e0..38507a6c2 100644 --- a/Machines/Electron/Video.hpp +++ b/Machines/Electron/Video.hpp @@ -93,7 +93,6 @@ class VideoOutput { inline void setup_base_address(); int output_position_ = 0; - int unused_cycles_ = 0; uint8_t palette_[16]; uint8_t screen_mode_ = 6; diff --git a/Outputs/CRT/CRT.hpp b/Outputs/CRT/CRT.hpp index 5ca2c53a0..8c9a79f5d 100644 --- a/Outputs/CRT/CRT.hpp +++ b/Outputs/CRT/CRT.hpp @@ -55,10 +55,8 @@ class CRT { }; void output_scan(const Scan *scan); - int16_t colour_burst_angle_ = 0; uint8_t colour_burst_amplitude_ = 30; int colour_burst_phase_adjustment_ = 0xff; - bool is_writing_composite_run_ = false; int64_t phase_denominator_ = 1; int64_t phase_numerator_ = 0; diff --git a/Processors/6502/Implementation/6502Storage.hpp b/Processors/6502/Implementation/6502Storage.hpp index e5464430c..037943b70 100644 --- a/Processors/6502/Implementation/6502Storage.hpp +++ b/Processors/6502/Implementation/6502Storage.hpp @@ -286,7 +286,7 @@ class ProcessorStorage { bool nmi_line_is_enabled_ = false, set_overflow_line_is_enabled_ = false; // Allow state objects to capture and apply state. - friend class State; + friend struct State; }; #endif /* _502Storage_h */ diff --git a/Processors/68000/Implementation/68000Storage.hpp b/Processors/68000/Implementation/68000Storage.hpp index ccb5c938a..31a7c7eeb 100644 --- a/Processors/68000/Implementation/68000Storage.hpp +++ b/Processors/68000/Implementation/68000Storage.hpp @@ -545,9 +545,9 @@ class ProcessorStorage { inline void set_status(uint16_t); private: - friend class ProcessorStorageConstructor; + friend struct ProcessorStorageConstructor; friend class ProcessorStorageTests; - friend class State; + friend struct State; }; #endif /* MC68000Storage_h */ diff --git a/Processors/68000/State/State.cpp b/Processors/68000/State/State.cpp index 5faab1dcd..b8e8bb7ec 100644 --- a/Processors/68000/State/State.cpp +++ b/Processors/68000/State/State.cpp @@ -93,7 +93,7 @@ State::State(const ProcessorBase &src): State() { // Encode the BusStep. struct BusStepOption { const ProcessorBase::BusStep *const base; - const ExecutionState::BusStepSource source; + const ExecutionState::BusStepSource source = ExecutionState::BusStepSource::FollowMicroOp; }; BusStepOption bus_step_options[] = { { diff --git a/Reflection/Struct.cpp b/Reflection/Struct.cpp index 3c3a47cc3..72c2e2162 100644 --- a/Reflection/Struct.cpp +++ b/Reflection/Struct.cpp @@ -358,7 +358,7 @@ std::vector Reflection::Struct::serialise() const { }; auto append = [push_name, this] (std::vector &result, const std::string &key, const std::string &output_name, const std::type_info *type, size_t offset) { - auto push_int = [push_name, &result, &output_name] (auto x) { + auto push_int = [&result] (auto x) { for(size_t c = 0; c < sizeof(x); ++c) result.push_back(uint8_t((x) >> (8 * c))); }; diff --git a/Storage/Disk/DiskImage/Formats/STX.cpp b/Storage/Disk/DiskImage/Formats/STX.cpp index 88cb98ea5..0b8edf267 100644 --- a/Storage/Disk/DiskImage/Formats/STX.cpp +++ b/Storage/Disk/DiskImage/Formats/STX.cpp @@ -179,6 +179,7 @@ class TrackConstructor { TrackConstructor(const std::vector &track_data, const std::vector §ors, size_t track_size, uint16_t first_sync) : track_data_(track_data), sectors_(sectors), track_size_(track_size), first_sync_(first_sync) { + (void)first_sync_; } std::shared_ptr get_track() { @@ -383,8 +384,7 @@ class TrackConstructor { const std::vector &track_data_; const std::vector §ors_; const size_t track_size_; - const uint16_t first_sync_; - + const uint16_t first_sync_; }; } diff --git a/Storage/Disk/Encodings/MFM/Encoder.cpp b/Storage/Disk/Encodings/MFM/Encoder.cpp index 391cfac7d..b69f9a6fc 100644 --- a/Storage/Disk/Encodings/MFM/Encoder.cpp +++ b/Storage/Disk/Encodings/MFM/Encoder.cpp @@ -335,7 +335,7 @@ std::shared_ptr Storage::Encodings::MFM::GetFMTrackWithSec sector_pointers(sectors), 26, 0xff, 6, - 11, 0xff, + 11, sector_gap_filler_byte, 6, (sector_gap_length != DefaultSectorGapLength) ? sector_gap_length : 27, 0xff, 6250); // i.e. 250kbps (including clocks) * 60 = 15000kpm, at 300 rpm => 50 kbits/rotation => 6250 bytes/rotation @@ -346,7 +346,7 @@ std::shared_ptr Storage::Encodings::MFM::GetFMTrackWithSec sectors, 26, 0xff, 6, - 11, 0xff, + 11, sector_gap_filler_byte, 6, (sector_gap_length != DefaultSectorGapLength) ? sector_gap_length : 27, 0xff, 6250); // i.e. 250kbps (including clocks) * 60 = 15000kpm, at 300 rpm => 50 kbits/rotation => 6250 bytes/rotation @@ -357,7 +357,7 @@ std::shared_ptr Storage::Encodings::MFM::GetMFMTrackWithSe sector_pointers(sectors), 50, 0x4e, 12, - 22, 0x4e, + 22, sector_gap_filler_byte, 12, (sector_gap_length != DefaultSectorGapLength) ? sector_gap_length : 54, 0xff, 12500); // unintelligently: double the single-density bytes/rotation (or: 500kbps @ 300 rpm) @@ -368,7 +368,7 @@ std::shared_ptr Storage::Encodings::MFM::GetMFMTrackWithSe sectors, 50, 0x4e, 12, - 22, 0x4e, + 22, sector_gap_filler_byte, 12, (sector_gap_length != DefaultSectorGapLength) ? sector_gap_length : 54, 0xff, 12500); // unintelligently: double the single-density bytes/rotation (or: 500kbps @ 300 rpm) diff --git a/Storage/Disk/Encodings/MFM/Encoder.hpp b/Storage/Disk/Encodings/MFM/Encoder.hpp index 822ee4d89..8c5c5fc09 100644 --- a/Storage/Disk/Encodings/MFM/Encoder.hpp +++ b/Storage/Disk/Encodings/MFM/Encoder.hpp @@ -39,8 +39,8 @@ std::shared_ptr GetMFMTrackWithSectors(const std::vector GetFMTrackWithSectors(const std::vector §ors, std::size_t sector_gap_length = DefaultSectorGapLength, uint8_t sector_gap_filler_byte = 0x4e); -std::shared_ptr GetFMTrackWithSectors(const std::vector §ors, std::size_t sector_gap_length = DefaultSectorGapLength, uint8_t sector_gap_filler_byte = 0x4e); +std::shared_ptr GetFMTrackWithSectors(const std::vector §ors, std::size_t sector_gap_length = DefaultSectorGapLength, uint8_t sector_gap_filler_byte = 0xff); +std::shared_ptr GetFMTrackWithSectors(const std::vector §ors, std::size_t sector_gap_length = DefaultSectorGapLength, uint8_t sector_gap_filler_byte = 0xff); class Encoder { public: diff --git a/Storage/Tape/Parsers/Oric.hpp b/Storage/Tape/Parsers/Oric.hpp index 7c62821d2..0b46541e9 100644 --- a/Storage/Tape/Parsers/Oric.hpp +++ b/Storage/Tape/Parsers/Oric.hpp @@ -48,7 +48,7 @@ class Parser: public Storage::Tape::PulseClassificationParser &waves, const Pattern *pattern); };