diff --git a/Machines/Apple/ADB/Keyboard.cpp b/Machines/Apple/ADB/Keyboard.cpp index 11c231a6f..9a9ad556f 100644 --- a/Machines/Apple/ADB/Keyboard.cpp +++ b/Machines/Apple/ADB/Keyboard.cpp @@ -16,6 +16,7 @@ void Keyboard::perform_command(const Command &command) { switch(command.type) { case Command::Type::Reset: modifiers_ = 0xffff; + [[fallthrough]]; case Command::Type::Flush: { std::lock_guard lock_guard(keys_mutex_); pending_events_.clear(); diff --git a/Machines/Sinclair/Keyboard/Keyboard.cpp b/Machines/Sinclair/Keyboard/Keyboard.cpp index f0cd23b39..240c8f5e6 100644 --- a/Machines/Sinclair/Keyboard/Keyboard.cpp +++ b/Machines/Sinclair/Keyboard/Keyboard.cpp @@ -280,6 +280,7 @@ const uint16_t *CharacterMapper::sequence_for_character(char character) const { case Machine::ZX81: return table_lookup_sequence_for_character(zx81_key_sequences, character); + default: case Machine::ZXSpectrum: return table_lookup_sequence_for_character(spectrum_key_sequences, character); } diff --git a/Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp b/Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp index bcee2de17..cba648d6e 100644 --- a/Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp +++ b/Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp @@ -420,6 +420,7 @@ template class ConcreteMachine: break; } } + [[fallthrough]]; case PartialMachineCycle::Read: if constexpr (model == Model::SixteenK) { diff --git a/Reflection/Struct.hpp b/Reflection/Struct.hpp index 24dbd489d..464860ade 100644 --- a/Reflection/Struct.hpp +++ b/Reflection/Struct.hpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -318,12 +319,12 @@ template class StructImpl: public Struct { if(iterator != contents_.end()) { return iterator->first; } else { - return ""; + return std::string(); } } private: - template bool declare_reflectable(Type *t, const std::string &name) { + template bool declare_reflectable([[maybe_unused]] Type *t, const std::string &name) { if constexpr (std::is_base_of::value) { Reflection::Struct *const str = static_cast(t); declare_emplace(str, name);