summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorTilka <tilkax@gmail.com>2019-02-02 14:13:21 +0000
committerGitHub <noreply@github.com>2019-02-02 14:13:21 +0000
commit28c0b5338ee4c0ef1fc30c557e27e896c135c1ca (patch)
tree3ff6c92b0bc6205a45726a804f3be214f1e82162 /Source/Core
parentd55e276d0bf9c96e5b1d9c772823ff46d84f84e4 (diff)
parent0691971d82b657afa3543cd18eb6375ca68b0f35 (diff)
Merge pull request #7738 from spycrab/core_warnings
Core: Fix some warnings
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Analytics.cpp2
-rw-r--r--Source/Core/Core/HW/Sram.cpp4
-rw-r--r--Source/Core/Core/HW/SystemTimers.cpp3
-rw-r--r--Source/Core/Core/NetPlayClient.cpp5
-rw-r--r--Source/Core/Core/NetPlayServer.cpp12
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;
}