From c9af7def28fc1f23398a8ebf7074bd1869bf7892 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Tue, 23 Jun 2015 21:11:56 +0200 Subject: [PATCH] Fix some warnings --- Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp | 3 +++ Source/Core/Core/IPC_HLE/WII_IPC_HLE.h | 6 +++--- Source/Core/Core/NetPlayClient.cpp | 2 +- Source/Core/Core/NetPlayServer.cpp | 2 +- Source/Core/VideoBackends/Software/TransformUnit.cpp | 7 ------- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp index d428573442..8dd9fc9697 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp @@ -57,6 +57,9 @@ They will also generate a true or false return for UpdateInterrupts() in WII_IPC #include "Core/PowerPC/PowerPC.h" +const u32 IPC_DEFAULT_DELAY = SystemTimers::GetTicksPerSecond() / 4000; // 250 us +const IPCCommandResult IPC_NO_REPLY = { false, 0 }; +const IPCCommandResult IPC_DEFAULT_REPLY = { true, IPC_DEFAULT_DELAY }; namespace WII_IPC_HLE_Interface { diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE.h b/Source/Core/Core/IPC_HLE/WII_IPC_HLE.h index 31142804b3..d725fa14ba 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE.h +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE.h @@ -34,9 +34,9 @@ enum IPCCommandType : u32 IPC_REP_ASYNC = 8 }; -static const u32 IPC_DEFAULT_DELAY = SystemTimers::GetTicksPerSecond() / 4000; // 250 us -static const IPCCommandResult IPC_NO_REPLY = { false, 0 }; -static const IPCCommandResult IPC_DEFAULT_REPLY = { true, IPC_DEFAULT_DELAY }; +extern const u32 IPC_DEFAULT_DELAY; +extern const IPCCommandResult IPC_NO_REPLY; +extern const IPCCommandResult IPC_DEFAULT_REPLY; namespace WII_IPC_HLE_Interface { diff --git a/Source/Core/Core/NetPlayClient.cpp b/Source/Core/Core/NetPlayClient.cpp index 5cc7214846..e7ccc696da 100644 --- a/Source/Core/Core/NetPlayClient.cpp +++ b/Source/Core/Core/NetPlayClient.cpp @@ -468,7 +468,7 @@ unsigned int NetPlayClient::OnData(sf::Packet& packet) case NP_MSG_SYNC_GC_SRAM: { u8 sram[sizeof(g_SRAM.p_SRAM)]; - for (int i = 0; i < sizeof(g_SRAM.p_SRAM); ++i) + for (size_t i = 0; i < sizeof(g_SRAM.p_SRAM); ++i) { packet >> sram[i]; } diff --git a/Source/Core/Core/NetPlayServer.cpp b/Source/Core/Core/NetPlayServer.cpp index e34d4c6e75..b26a5d0391 100644 --- a/Source/Core/Core/NetPlayServer.cpp +++ b/Source/Core/Core/NetPlayServer.cpp @@ -315,7 +315,7 @@ unsigned int NetPlayServer::OnConnect(ENetPeer* socket) } spac.clear(); spac << (MessageId)NP_MSG_SYNC_GC_SRAM; - for (int i = 0; i < sizeof(g_SRAM.p_SRAM); ++i) + for (size_t i = 0; i < sizeof(g_SRAM.p_SRAM); ++i) { spac << g_SRAM.p_SRAM[i]; } diff --git a/Source/Core/VideoBackends/Software/TransformUnit.cpp b/Source/Core/VideoBackends/Software/TransformUnit.cpp index e7e46691fd..c72fd0f8f0 100644 --- a/Source/Core/VideoBackends/Software/TransformUnit.cpp +++ b/Source/Core/VideoBackends/Software/TransformUnit.cpp @@ -189,13 +189,6 @@ struct LightPointer Vec3 dir; }; -static inline void AddIntegerColor(const u8 *src, Vec3 &dst) -{ - dst.x += src[1]; - dst.y += src[2]; - dst.z += src[3]; -} - static inline void AddScaledIntegerColor(const u8 *src, float scale, Vec3 &dst) { dst.x += src[1] * scale;