From 0204003680ee27c0d885811e7c850366e79e34e9 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 9 Nov 2019 16:12:37 -0500 Subject: [PATCH] Resolves GCC warnings. --- Machines/Atari/ST/AtariST.cpp | 4 ++-- Storage/Disk/DiskImage/Formats/MSA.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Machines/Atari/ST/AtariST.cpp b/Machines/Atari/ST/AtariST.cpp index 9b813c25b..e100043f8 100644 --- a/Machines/Atari/ST/AtariST.cpp +++ b/Machines/Atari/ST/AtariST.cpp @@ -182,9 +182,9 @@ class ConcreteMachine: } auto address = cycle.word_address(); -// if(cycle.data_select_active()) printf("%c %06x\n", (cycle.operation & Microcycle::Read) ? 'r' : 'w', *cycle.address & 0xffffff); - uint16_t *memory; + uint16_t *memory = nullptr; switch(memory_map_[address >> 15]) { + default: case BusDevice::MostlyRAM: if(address < 4) { memory = rom_.data(); diff --git a/Storage/Disk/DiskImage/Formats/MSA.cpp b/Storage/Disk/DiskImage/Formats/MSA.cpp index 38f3f5bdd..50a9e510c 100644 --- a/Storage/Disk/DiskImage/Formats/MSA.cpp +++ b/Storage/Disk/DiskImage/Formats/MSA.cpp @@ -61,7 +61,7 @@ MSA::MSA(const std::string &file_name) : } } - if(uncompressed_tracks_.size() != (ending_track_ - starting_track_ + 1)*sides_) throw Error::InvalidFormat; + if(uncompressed_tracks_.size() != size_t((ending_track_ - starting_track_ + 1)*sides_)) throw Error::InvalidFormat; } std::shared_ptr<::Storage::Disk::Track> MSA::get_track_at_position(::Storage::Disk::Track::Address address) {