diff --git a/Source/Core/Common/Config/Config.cpp b/Source/Core/Common/Config/Config.cpp index b65b1d6fad..4d172ae9c2 100644 --- a/Source/Core/Common/Config/Config.cpp +++ b/Source/Core/Common/Config/Config.cpp @@ -35,7 +35,7 @@ using ReadLock = std::shared_lock; using WriteLock = std::unique_lock; #endif -void AddLayerInternal(std::shared_ptr layer) +static void AddLayerInternal(std::shared_ptr layer) { { WriteLock lock(s_layers_rw_lock); diff --git a/Source/Core/Core/BootManager.cpp b/Source/Core/Core/BootManager.cpp index 36d01face4..9e48f2108b 100644 --- a/Source/Core/Core/BootManager.cpp +++ b/Source/Core/Core/BootManager.cpp @@ -425,6 +425,8 @@ bool BootCore(std::unique_ptr boot, const WindowSystemInfo& wsi) case DiscIO::Region::NTSC_K: Config::SetCurrent(Config::SYSCONF_COUNTRY, 0x88); // South Korea break; + case DiscIO::Region::Unknown: + break; } } } diff --git a/Source/Core/Core/HW/AddressSpace.cpp b/Source/Core/Core/HW/AddressSpace.cpp index 0b5cb86288..3a98414c30 100644 --- a/Source/Core/Core/HW/AddressSpace.cpp +++ b/Source/Core/Core/HW/AddressSpace.cpp @@ -303,7 +303,7 @@ private: struct SmallBlockAccessors : Accessors { - SmallBlockAccessors(u8** alloc_base, u32 size) : alloc_base(alloc_base), size(size) {} + SmallBlockAccessors(u8** alloc_base_, u32 size_) : alloc_base{alloc_base_}, size{size_} {} bool IsValidAddress(u32 address) const override { diff --git a/Source/Core/Core/HW/GCMemcard/GCMemcard.cpp b/Source/Core/Core/HW/GCMemcard/GCMemcard.cpp index 0f9588f0c8..cc8dc7b118 100644 --- a/Source/Core/Core/HW/GCMemcard/GCMemcard.cpp +++ b/Source/Core/Core/HW/GCMemcard/GCMemcard.cpp @@ -321,7 +321,7 @@ bool GCMemcard::Save() return mcdFile.Close(); } -std::pair CalculateMemcardChecksums(const u8* data, size_t size) +static std::pair CalculateMemcardChecksums(const u8* data, size_t size) { assert(size % 2 == 0); u16 csum = 0; diff --git a/Source/Core/Core/IOS/USB/Bluetooth/WiimoteDevice.cpp b/Source/Core/Core/IOS/USB/Bluetooth/WiimoteDevice.cpp index bc413cb9d8..4cdc16a3b2 100644 --- a/Source/Core/Core/IOS/USB/Bluetooth/WiimoteDevice.cpp +++ b/Source/Core/Core/IOS/USB/Bluetooth/WiimoteDevice.cpp @@ -211,7 +211,7 @@ void WiimoteDevice::Activate(bool ready) void WiimoteDevice::EventConnectionAccepted() { - DEBUG_LOG(IOS_WIIMOTE, "ConnectionState %x -> CONN_LINKING", m_connection_state); + DEBUG_LOG(IOS_WIIMOTE, "ConnectionState %x -> CONN_LINKING", int(m_connection_state)); m_connection_state = ConnectionState::Linking; } diff --git a/Source/Core/Core/IOS/USB/USB_KBD.cpp b/Source/Core/Core/IOS/USB/USB_KBD.cpp index 5f690506cb..77b6c47fd7 100644 --- a/Source/Core/Core/IOS/USB/USB_KBD.cpp +++ b/Source/Core/Core/IOS/USB/USB_KBD.cpp @@ -176,9 +176,9 @@ constexpr std::array s_key_codes_azerty{}; #endif } // Anonymous namespace -USB_KBD::MessageData::MessageData(MessageType type, u8 modifiers, PressedKeyData pressed_keys) - : msg_type{Common::swap32(static_cast(type))}, modifiers{modifiers}, pressed_keys{ - pressed_keys} +USB_KBD::MessageData::MessageData(MessageType type, u8 modifiers_, PressedKeyData pressed_keys_) + : msg_type{Common::swap32(static_cast(type))}, modifiers{modifiers_}, pressed_keys{ + pressed_keys_} { } diff --git a/Source/Core/DiscIO/Blob.h b/Source/Core/DiscIO/Blob.h index d152f50f28..3c4ea03307 100644 --- a/Source/Core/DiscIO/Blob.h +++ b/Source/Core/DiscIO/Blob.h @@ -53,7 +53,7 @@ public: { T temp; if (!Read(offset, sizeof(T), reinterpret_cast(&temp))) - return {}; + return std::nullopt; return Common::FromBigEndian(temp); } diff --git a/Source/Core/DiscIO/DirectoryBlob.cpp b/Source/Core/DiscIO/DirectoryBlob.cpp index 3865cf30e9..723133fd8b 100644 --- a/Source/Core/DiscIO/DirectoryBlob.cpp +++ b/Source/Core/DiscIO/DirectoryBlob.cpp @@ -451,7 +451,7 @@ void DirectoryBlobReader::SetWiiRegionData(const std::string& game_partition_roo ERROR_LOG(DISCIO, "Couldn't read age ratings from %s", region_bin_path.c_str()); constexpr u64 WII_REGION_DATA_ADDRESS = 0x4E000; - constexpr u64 WII_REGION_DATA_SIZE = 0x20; + [[maybe_unused]] constexpr u64 WII_REGION_DATA_SIZE = 0x20; m_nonpartition_contents.Add(WII_REGION_DATA_ADDRESS, m_wii_region_data); } diff --git a/Source/Core/DiscIO/Volume.h b/Source/Core/DiscIO/Volume.h index 81d986f547..925c41e230 100644 --- a/Source/Core/DiscIO/Volume.h +++ b/Source/Core/DiscIO/Volume.h @@ -50,7 +50,7 @@ public: { T temp; if (!Read(offset, sizeof(T), reinterpret_cast(&temp), partition)) - return {}; + return std::nullopt; return Common::FromBigEndian(temp); } std::optional ReadSwappedAndShifted(u64 offset, const Partition& partition) const diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp index 15d53f62a1..b6b7ea4901 100644 --- a/Source/Core/DiscIO/VolumeVerifier.cpp +++ b/Source/Core/DiscIO/VolumeVerifier.cpp @@ -88,11 +88,9 @@ void RedumpVerifier::Start(const Volume& volume) return {}; } - DownloadStatus status; { std::lock_guard lk(download_state->mutex); download_state->status = DownloadDatfile(system, download_state->status); - status = download_state->status; } switch (download_state->status)