Fix some warnings

This commit is contained in:
Tillmann Karras 2015-06-23 21:11:56 +02:00
parent 21a70903ed
commit c9af7def28
5 changed files with 8 additions and 12 deletions

View File

@ -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
{

View File

@ -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
{

View File

@ -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];
}

View File

@ -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];
}

View File

@ -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;