mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 07:09:48 -06:00
Fix several warnings
A small, nonexhaustive set of warning fixes. The DiscIO Volume change is a workaround for a GCC bug [1] that causes returning an unengaged std::optional to emit annoying -Wmaybe-uninitialized warnings. This last change alone fixes pages upon pages of warnings since Volume.h is included from several files. -Wstringop-truncation is another irrelevant warning for us, but unfortunately there seems to be no way to disable it without adding ugly pragmas wherever the warning appears.
This commit is contained in:
@ -53,7 +53,7 @@ public:
|
||||
{
|
||||
T temp;
|
||||
if (!Read(offset, sizeof(T), reinterpret_cast<u8*>(&temp)))
|
||||
return {};
|
||||
return std::nullopt;
|
||||
return Common::FromBigEndian(temp);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user