diff options
| author | spycrab <spycrab@users.noreply.github.com> | 2019-01-25 17:33:17 +0100 |
|---|---|---|
| committer | spycrab <spycrab@users.noreply.github.com> | 2019-01-25 21:21:22 +0100 |
| commit | 0691971d82b657afa3543cd18eb6375ca68b0f35 (patch) | |
| tree | 531c1026810de0cbcd11bf4b50192e24c84577e7 /Source/Core | |
| parent | 6962d5bc5217562b0200a47968e013e9c820feeb (diff) | |
Core: Fix some warnings
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/Analytics.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/Core/HW/Sram.cpp | 4 | ||||
| -rw-r--r-- | Source/Core/Core/HW/SystemTimers.cpp | 3 | ||||
| -rw-r--r-- | Source/Core/Core/NetPlayClient.cpp | 5 | ||||
| -rw-r--r-- | Source/Core/Core/NetPlayServer.cpp | 12 |
5 files changed, 15 insertions, 11 deletions
diff --git a/Source/Core/Core/Analytics.cpp b/Source/Core/Core/Analytics.cpp index e6f9db25c2..32157cf1ac 100644 --- a/Source/Core/Core/Analytics.cpp +++ b/Source/Core/Core/Analytics.cpp @@ -137,7 +137,7 @@ void DolphinAnalytics::ReportGameStart() } // Keep in sync with enum class GameQuirk definition. -const char* GAME_QUIRKS_NAMES[] = { +static const char* GAME_QUIRKS_NAMES[] = { "icache-matters", // ICACHE_MATTERS }; static_assert(sizeof(GAME_QUIRKS_NAMES) / sizeof(GAME_QUIRKS_NAMES[0]) == diff --git a/Source/Core/Core/HW/Sram.cpp b/Source/Core/Core/HW/Sram.cpp index 51ce971230..2c2be5f336 100644 --- a/Source/Core/Core/HW/Sram.cpp +++ b/Source/Core/Core/HW/Sram.cpp @@ -12,9 +12,10 @@ // English // This is just a template. Most/all fields are updated with sane(r) values at runtime. +// clang-format off const Sram sram_dump = {Common::BigEndianValue<u32>{0}, {Common::BigEndianValue<u16>{0x2c}, Common::BigEndianValue<u16>{0xffd0}, 0, - 0, 0, 0, 0, 0, 0x20 | SramFlags::kOobeDone | SramFlags::kStereo}, + 0, 0, 0, 0, 0, {0x20 | SramFlags::kOobeDone | SramFlags::kStereo}}, {{ {'D', 'O', 'L', 'P', 'H', 'I', 'N', 'S', 'L', 'O', 'T', 'A'}, {'D', 'O', 'L', 'P', 'H', 'I', 'N', 'S', 'L', 'O', 'T', 'B'}, @@ -26,6 +27,7 @@ const Sram sram_dump = {Common::BigEndianValue<u32>{0}, {0x6E, 0x6D}, 0, {}}}; +// clang-format on #if 0 // german diff --git a/Source/Core/Core/HW/SystemTimers.cpp b/Source/Core/Core/HW/SystemTimers.cpp index eedaa8a0c8..3a0b3192a8 100644 --- a/Source/Core/Core/HW/SystemTimers.cpp +++ b/Source/Core/Core/HW/SystemTimers.cpp @@ -46,6 +46,7 @@ IPC_HLE_PERIOD: For the Wii Remote this is the call schedule: #include "Core/HW/SystemTimers.h" #include <cfloat> +#include <cinttypes> #include <cmath> #include <cstdlib> @@ -192,7 +193,7 @@ void ThrottleCallback(u64 last_time, s64 cyclesLate) const s64 max_fallback = config.iTimingVariance * 1000; if (abs(diff) > max_fallback) { - DEBUG_LOG(COMMON, "system too %s, %ld ms skipped", diff < 0 ? "slow" : "fast", + DEBUG_LOG(COMMON, "system too %s, %" PRIi64 " ms skipped", diff < 0 ? "slow" : "fast", abs(diff) - max_fallback); last_time = time - max_fallback; } diff --git a/Source/Core/Core/NetPlayClient.cpp b/Source/Core/Core/NetPlayClient.cpp index c18b56ff13..85a577fca2 100644 --- a/Source/Core/Core/NetPlayClient.cpp +++ b/Source/Core/Core/NetPlayClient.cpp @@ -2184,12 +2184,13 @@ void SetupWiimotes() ASSERT(IsNetPlayRunning()); const NetSettings& netplay_settings = netplay_client->GetNetSettings(); const PadMappingArray& wiimote_map = netplay_client->GetWiimoteMapping(); - for (int i = 0; i < netplay_settings.m_WiimoteExtension.size(); i++) + for (size_t i = 0; i < netplay_settings.m_WiimoteExtension.size(); i++) { if (wiimote_map[i] > 0) { static_cast<ControllerEmu::Extension*>( - static_cast<WiimoteEmu::Wiimote*>(Wiimote::GetConfig()->GetController(i)) + static_cast<WiimoteEmu::Wiimote*>( + Wiimote::GetConfig()->GetController(static_cast<int>(i))) ->GetWiimoteGroup(WiimoteEmu::WiimoteGroup::Extension)) ->switch_extension = netplay_settings.m_WiimoteExtension[i]; } diff --git a/Source/Core/Core/NetPlayServer.cpp b/Source/Core/Core/NetPlayServer.cpp index 206936ed1d..9a96346f0f 100644 --- a/Source/Core/Core/NetPlayServer.cpp +++ b/Source/Core/Core/NetPlayServer.cpp @@ -1215,13 +1215,13 @@ bool NetPlayServer::StartGame() spac << m_settings.m_SyncCodes; spac << m_settings.m_SyncAllWiiSaves; - for (int i = 0; i < m_settings.m_WiimoteExtension.size(); i++) + for (size_t i = 0; i < m_settings.m_WiimoteExtension.size(); i++) { - const int extension = - static_cast<ControllerEmu::Extension*>( - static_cast<WiimoteEmu::Wiimote*>(Wiimote::GetConfig()->GetController(i)) - ->GetWiimoteGroup(WiimoteEmu::WiimoteGroup::Extension)) - ->switch_extension; + const int extension = static_cast<ControllerEmu::Extension*>( + static_cast<WiimoteEmu::Wiimote*>( + Wiimote::GetConfig()->GetController(static_cast<int>(i))) + ->GetWiimoteGroup(WiimoteEmu::WiimoteGroup::Extension)) + ->switch_extension; spac << extension; } |
