summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorLC <mathew1800@gmail.com>2020-07-24 12:53:24 -0400
committerGitHub <noreply@github.com>2020-07-24 12:53:24 -0400
commit520af035d2dec281e8bc43440948621c7e7b1bd9 (patch)
treea41f0b73e1c2358d2257b35a1e8b5b03c11e477e /Source
parentf96f3b32788dc2e15a24288f56900d76ea78ecfa (diff)
parent062dd5ab0aea4e92cd8d2e58a6815eea52733701 (diff)
Merge pull request #8980 from Tilka/warnings
Fix some GCC warnings
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/HW/EXI/EXI_Channel.h6
-rw-r--r--Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.cpp2
-rw-r--r--Source/Core/Core/IOS/Network/Socket.cpp4
-rw-r--r--Source/Core/DiscIO/WIABlob.cpp6
-rw-r--r--Source/Core/DolphinQt/Debugger/ThreadWidget.cpp5
-rw-r--r--Source/Core/DolphinQt/GameList/GameList.cpp1
6 files changed, 9 insertions, 15 deletions
diff --git a/Source/Core/Core/HW/EXI/EXI_Channel.h b/Source/Core/Core/HW/EXI/EXI_Channel.h
index 26b681d74b..d3a25c07a7 100644
--- a/Source/Core/Core/HW/EXI/EXI_Channel.h
+++ b/Source/Core/Core/HW/EXI/EXI_Channel.h
@@ -109,6 +109,9 @@ private:
UEXI_CONTROL m_control;
u32 m_imm_data = 0;
+ // Since channels operate a bit differently from each other
+ u32 m_channel_id;
+
// This data is needed in order to reinitialize a GCI folder memory card when switching between
// GCI folder and other devices in the memory card slot or after loading a savestate. Even though
// this data is only vaguely related to the EXI_Channel, this seems to be the best place to store
@@ -122,8 +125,5 @@ private:
};
std::array<std::unique_ptr<IEXIDevice>, NUM_DEVICES> m_devices;
-
- // Since channels operate a bit differently from each other
- u32 m_channel_id;
};
} // namespace ExpansionInterface
diff --git a/Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.cpp b/Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.cpp
index 4f0b3830f3..2174ce7df1 100644
--- a/Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.cpp
+++ b/Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.cpp
@@ -185,8 +185,6 @@ void CEXIMemoryCard::SetupGciFolder(const Memcard::HeaderData& header_data)
CurrentGameId = Common::swap32(reinterpret_cast<const u8*>(game_id.c_str()));
}
- const bool shift_jis = header_data.m_encoding != 0;
-
const auto [strDirectoryName, migrate] = GetGCIFolderPath(card_index, AllowMovieFolder::Yes);
const File::FileInfo file_info(strDirectoryName);
diff --git a/Source/Core/Core/IOS/Network/Socket.cpp b/Source/Core/Core/IOS/Network/Socket.cpp
index 9b04ba41ab..ae8f2b08e3 100644
--- a/Source/Core/Core/IOS/Network/Socket.cpp
+++ b/Source/Core/Core/IOS/Network/Socket.cpp
@@ -754,7 +754,7 @@ void WiiSockMan::UpdatePollCommands()
const auto elapsed = elapsed_d.count();
last_time = now;
- for (auto& pcmd : pending_polls)
+ for (PollCommand& pcmd : pending_polls)
{
// Don't touch negative timeouts
if (pcmd.timeout > 0)
@@ -764,7 +764,7 @@ void WiiSockMan::UpdatePollCommands()
pending_polls.erase(
std::remove_if(
pending_polls.begin(), pending_polls.end(),
- [this](auto& pcmd) {
+ [this](PollCommand& pcmd) {
const auto request = Request(pcmd.request_addr);
auto& pfds = pcmd.wii_fds;
int ret = 0;
diff --git a/Source/Core/DiscIO/WIABlob.cpp b/Source/Core/DiscIO/WIABlob.cpp
index 4886ceaf7c..e1e9ecb543 100644
--- a/Source/Core/DiscIO/WIABlob.cpp
+++ b/Source/Core/DiscIO/WIABlob.cpp
@@ -603,9 +603,9 @@ WIARVZFileReader<RVZ>::Chunk::Chunk(File::IOFile* file, u64 offset_in_file, u64
u64 decompressed_size, u32 exception_lists,
bool compressed_exception_lists, u32 rvz_packed_size,
u64 data_offset, std::unique_ptr<Decompressor> decompressor)
- : m_file(file), m_offset_in_file(offset_in_file), m_exception_lists(exception_lists),
- m_compressed_exception_lists(compressed_exception_lists), m_rvz_packed_size(rvz_packed_size),
- m_data_offset(data_offset), m_decompressor(std::move(decompressor))
+ : m_decompressor(std::move(decompressor)), m_file(file), m_offset_in_file(offset_in_file),
+ m_exception_lists(exception_lists), m_compressed_exception_lists(compressed_exception_lists),
+ m_rvz_packed_size(rvz_packed_size), m_data_offset(data_offset)
{
constexpr size_t MAX_SIZE_PER_EXCEPTION_LIST =
Common::AlignUp(VolumeWii::BLOCK_HEADER_SIZE, sizeof(SHA1)) / sizeof(SHA1) *
diff --git a/Source/Core/DolphinQt/Debugger/ThreadWidget.cpp b/Source/Core/DolphinQt/Debugger/ThreadWidget.cpp
index 18bb7af3fb..eb67e2ad7d 100644
--- a/Source/Core/DolphinQt/Debugger/ThreadWidget.cpp
+++ b/Source/Core/DolphinQt/Debugger/ThreadWidget.cpp
@@ -265,9 +265,6 @@ void ThreadWidget::Update()
const auto format_hex = [](u32 value) {
return QStringLiteral("%1").arg(value, 8, 16, QLatin1Char('0'));
};
- const auto format_f64_as_u64 = [](double value) {
- return QStringLiteral("%1").arg(Common::BitCast<u64>(value), 16, 16, QLatin1Char('0'));
- };
const auto format_hex_from = [&format_hex](u32 addr) {
addr = PowerPC::HostIsRAMAddress(addr) ? PowerPC::HostRead_U32(addr) : 0;
return format_hex(addr);
@@ -468,7 +465,7 @@ void ThreadWidget::OnSelectionChanged(int row)
{
Common::Debug::PartialContext context;
- if (row >= 0 && row < m_threads.size())
+ if (row >= 0 && size_t(row) < m_threads.size())
context = m_threads[row]->GetContext();
UpdateThreadContext(context);
diff --git a/Source/Core/DolphinQt/GameList/GameList.cpp b/Source/Core/DolphinQt/GameList/GameList.cpp
index 5de28a7bab..0b1d480375 100644
--- a/Source/Core/DolphinQt/GameList/GameList.cpp
+++ b/Source/Core/DolphinQt/GameList/GameList.cpp
@@ -305,7 +305,6 @@ void GameList::ShowContextMenu(const QPoint&)
if (DiscIO::IsDisc(platform))
{
menu->addAction(tr("Set as &Default ISO"), this, &GameList::SetDefaultISO);
- const auto blob_type = game->GetBlobType();
if (can_convert(game))
menu->addAction(tr("Convert File..."), this, &GameList::ConvertFile);