From 7b2e93eea83387f3eb65120d1b044ee757c08756 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Fri, 24 Jul 2020 15:35:24 +0100 Subject: [PATCH 1/7] EXI: fix -Wreorder warning --- Source/Core/Core/HW/EXI/EXI_Channel.h | 6 +++--- 1 file changed, 3 insertions(+), 3 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, NUM_DEVICES> m_devices; - - // Since channels operate a bit differently from each other - u32 m_channel_id; }; } // namespace ExpansionInterface From fbd34f72ad41fb7176f8f56d2c28686700ea2ec5 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Fri, 24 Jul 2020 15:35:35 +0100 Subject: [PATCH 2/7] EXI: fix -Wunused-variable warning --- Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.cpp | 2 -- 1 file changed, 2 deletions(-) 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(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); From 04b31e7eeec5a7a0b6b561ca00a59fa25ba3dea2 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Fri, 24 Jul 2020 16:37:47 +0100 Subject: [PATCH 3/7] IOS: work around incorrect -Wunused-but-set-variable warning https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96311 --- Source/Core/Core/IOS/Network/Socket.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; From bf5b1092b238940b046ca26a71dfeba80e8aea80 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Fri, 24 Jul 2020 16:44:35 +0100 Subject: [PATCH 4/7] DiscIO: fix -Wreorder warning --- Source/Core/DiscIO/WIABlob.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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::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) - : 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) * From 750cb1f83002d99beeac1164b7856dd4fb7b9e55 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Fri, 24 Jul 2020 16:48:54 +0100 Subject: [PATCH 5/7] DolphinQt: fix -Wunused-but-set-variable warning --- Source/Core/DolphinQt/Debugger/ThreadWidget.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/Source/Core/DolphinQt/Debugger/ThreadWidget.cpp b/Source/Core/DolphinQt/Debugger/ThreadWidget.cpp index 18bb7af3fb..89f880fc1a 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(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); From 5bd2b2699cfe08081301e8dc4a43dc06d87f2db1 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Fri, 24 Jul 2020 16:50:37 +0100 Subject: [PATCH 6/7] DolphinQt: fix -Wsign-compare warning --- Source/Core/DolphinQt/Debugger/ThreadWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/DolphinQt/Debugger/ThreadWidget.cpp b/Source/Core/DolphinQt/Debugger/ThreadWidget.cpp index 89f880fc1a..eb67e2ad7d 100644 --- a/Source/Core/DolphinQt/Debugger/ThreadWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/ThreadWidget.cpp @@ -465,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); From 062dd5ab0aea4e92cd8d2e58a6815eea52733701 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Fri, 24 Jul 2020 17:32:50 +0100 Subject: [PATCH 7/7] DolphinQt: fix -Wunused-variable warning --- Source/Core/DolphinQt/GameList/GameList.cpp | 1 - 1 file changed, 1 deletion(-) 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);