summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorConnor McLaughlin <stenzek@gmail.com>2020-01-04 21:24:27 +1000
committerGitHub <noreply@github.com>2020-01-04 21:24:27 +1000
commit04e9279f3d5ccefb45630fb3ddd4f00c5ed4bebc (patch)
tree69782ae2a5b49accf96055124afd7a8a4d56ecec /Source
parent94c5460693d2c79b619f2bf490feed7dc52138b6 (diff)
parentad75215bb0773148b8bd2e051b34dd1312238de7 (diff)
Merge pull request #8536 from leoetlino/warnings
Fix several warnings
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Common/Config/Config.cpp2
-rw-r--r--Source/Core/Core/BootManager.cpp2
-rw-r--r--Source/Core/Core/HW/AddressSpace.cpp2
-rw-r--r--Source/Core/Core/HW/GCMemcard/GCMemcard.cpp2
-rw-r--r--Source/Core/Core/IOS/USB/Bluetooth/WiimoteDevice.cpp2
-rw-r--r--Source/Core/Core/IOS/USB/USB_KBD.cpp6
-rw-r--r--Source/Core/DiscIO/Blob.h2
-rw-r--r--Source/Core/DiscIO/DirectoryBlob.cpp2
-rw-r--r--Source/Core/DiscIO/Volume.h2
-rw-r--r--Source/Core/DiscIO/VolumeVerifier.cpp2
10 files changed, 12 insertions, 12 deletions
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<std::shared_mutex>;
using WriteLock = std::unique_lock<std::shared_mutex>;
#endif
-void AddLayerInternal(std::shared_ptr<Layer> layer)
+static void AddLayerInternal(std::shared_ptr<Layer> 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<BootParameters> 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<u16, u16> CalculateMemcardChecksums(const u8* data, size_t size)
+static std::pair<u16, u16> 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<u8, 256> s_key_codes_azerty{};
#endif
} // Anonymous namespace
-USB_KBD::MessageData::MessageData(MessageType type, u8 modifiers, PressedKeyData pressed_keys)
- : msg_type{Common::swap32(static_cast<u32>(type))}, modifiers{modifiers}, pressed_keys{
- pressed_keys}
+USB_KBD::MessageData::MessageData(MessageType type, u8 modifiers_, PressedKeyData pressed_keys_)
+ : msg_type{Common::swap32(static_cast<u32>(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<u8*>(&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<u8*>(&temp), partition))
- return {};
+ return std::nullopt;
return Common::FromBigEndian(temp);
}
std::optional<u64> 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)