Systematically eliminating compiler warnings.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5117 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice 2010-02-24 03:38:36 +00:00
parent 3cc5d8ce6f
commit 1d40b8a5ae
26 changed files with 74 additions and 67 deletions

View File

@ -373,7 +373,7 @@ std::vector<std::string> cdio_get_devices() {
bool cdio_is_cdrom(std::string device) {
std::vector<std::string> devices = cdio_get_devices();
bool res = false;
for (int i = 0; i < devices.size(); i++) {
for (unsigned int i = 0; i < devices.size(); i++) {
if (strncmp(devices[i].c_str(), device.c_str(), PATH_MAX) == 0) {
res = true;
break;

View File

@ -10,9 +10,11 @@
#include "../Common.h"
#include "tools.h"
// y**2 + x*y = x**3 + x + b
/*
static u8 ec_b[30] =
{0x00,0x66,0x64,0x7e,0xde,0x6c,0x33,0x2c,0x7f,0x8c,0x09,0x23,0xbb,0x58,0x21
,0x3b,0x33,0x3b,0x20,0xe9,0xce,0x42,0x81,0xfe,0x11,0x5f,0x7d,0x8f,0x90,0xad};
*/
// order of the addition group of points
static u8 ec_N[30] =

View File

@ -612,11 +612,11 @@ bool Subtype_AddCode(u32 addr, u32 data)
bool Subtype_MasterCodeAndWriteToCCXXXXXX(u32 addr, u32 data)
{
u32 new_addr = (addr & 0x01FFFFFF) | 0x80000000;
u8 mcode_type = (data & 0xFF0000) >> 16;
u8 mcode_count = (data & 0xFF00) >> 8;
u8 mcode_number = data & 0xFF;
// code not yet implemented - TODO
// u32 new_addr = (addr & 0x01FFFFFF) | 0x80000000;
// u8 mcode_type = (data & 0xFF0000) >> 16;
// u8 mcode_count = (data & 0xFF00) >> 8;
// u8 mcode_number = data & 0xFF;
PanicAlert("Action Replay Error: Master Code and Write To CCXXXXXX not implemented (%s)", code.name.c_str());
return false;
}

View File

@ -561,11 +561,10 @@ void ExecuteCommand(UDICR& _DICR)
case 0x00: // Read Sector
{
u32 iDVDOffset = m_DICMDBUF[1].Hex << 2;
u32 iSrcLength = m_DICMDBUF[2].Hex;
DEBUG_LOG(DVDINTERFACE, "Read: DVDOffset=%08x, DMABuffer=%08x, SrcLength=%08x, DMALength=%08x",
iDVDOffset, m_DIMAR.Address, iSrcLength, m_DILENGTH.Length);
_dbg_assert_(DVDINTERFACE, iSrcLength == m_DILENGTH.Length);
iDVDOffset, m_DIMAR.Address, m_DICMDBUF[2].Hex, m_DILENGTH.Length);
_dbg_assert_(DVDINTERFACE, m_DICMDBUF[2].Hex == m_DILENGTH.Length);
if (GCAM)
{
@ -575,29 +574,29 @@ void ExecuteCommand(UDICR& _DICR)
{
case 0x80000000:
ERROR_LOG(DVDINTERFACE, "GC-AM: READ MEDIA BOARD STATUS (80000000)");
for (unsigned int i = 0; i < m_DILENGTH.Length / 4; i++)
for (int i = 0; i < m_DILENGTH.Length / 4; i++)
Memory::Write_U32(0, m_DIMAR.Address + i * 4);
break;
case 0x80000040:
ERROR_LOG(DVDINTERFACE, "GC-AM: READ MEDIA BOARD STATUS (2) (80000040)");
for (unsigned int i = 0; i < m_DILENGTH.Length / 4; i++)
for (int i = 0; i < m_DILENGTH.Length / 4; i++)
Memory::Write_U32(~0, m_DIMAR.Address + i * 4);
Memory::Write_U32(0x00000020, m_DIMAR.Address); // DIMM SIZE, LE
Memory::Write_U32(0x4743414D, m_DIMAR.Address + 4); // GCAM signature
break;
case 0x80000120:
ERROR_LOG(DVDINTERFACE, "GC-AM: READ FIRMWARE STATUS (80000120)");
for (unsigned int i = 0; i < m_DILENGTH.Length / 4; i++)
for (int i = 0; i < m_DILENGTH.Length / 4; i++)
Memory::Write_U32(0x01010101, m_DIMAR.Address + i * 4);
break;
case 0x80000140:
ERROR_LOG(DVDINTERFACE, "GC-AM: READ FIRMWARE STATUS (80000140)");
for (unsigned int i = 0; i < m_DILENGTH.Length / 4; i++)
for (int i = 0; i < m_DILENGTH.Length / 4; i++)
Memory::Write_U32(0x01010101, m_DIMAR.Address + i * 4);
break;
case 0x84000020:
ERROR_LOG(DVDINTERFACE, "GC-AM: READ MEDIA BOARD STATUS (1) (84000020)");
for (unsigned int i = 0; i < m_DILENGTH.Length / 4; i++)
for (int i = 0; i < m_DILENGTH.Length / 4; i++)
Memory::Write_U32(0x00000000, m_DIMAR.Address + i * 4);
break;
default:

View File

@ -206,6 +206,7 @@ void UpdateException()
PowerPC::ppcState.Exceptions &= ~EXCEPTION_EXTERNAL_INT;
}
#if MAX_LOGLEVEL >= DEBUG_LEVEL
static const char *Debug_GetInterruptName(u32 _causemask)
{
switch (_causemask)
@ -229,6 +230,7 @@ static const char *Debug_GetInterruptName(u32 _causemask)
default: return "!!! ERROR-unknown Interrupt !!!";
}
}
#endif
void SetInterrupt(u32 _causemask, bool _bSet)
{

View File

@ -242,7 +242,6 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
{
DEBUG_LOG(AMBASEBOARDDEBUG, "GC-AM: CMD %02x, %02x %02x %02x %02x %02x %02x %02x (JVS IO)",
ptr(0), ptr(1), ptr(2), ptr(3), ptr(4), ptr(5), ptr(6), ptr(7));
int total_length = ptr(1);
int pptr = 2;
JVSIOMessage msg;
@ -254,7 +253,6 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
int jvs_io_length = 0;
for (i=0; i<nr_bytes + 3; ++i)
jvs_io_buffer[jvs_io_length++] = ptr(pptr + i);
int ptr = 0;
int node = jvs_io_buffer[1];
unsigned char *jvs_io = jvs_io_buffer + 3;

View File

@ -769,7 +769,9 @@ static void BeginField(FieldType field)
u32 xfbAddr = (field == FIELD_LOWER) ? GetXFBAddressBottom() : GetXFBAddressTop();
#if MAX_LOGLEVEL >= DEBUG_LEVEL
static const char* const fieldTypeNames[] = { "Progressive", "Upper", "Lower" };
#endif
DEBUG_LOG(VIDEOINTERFACE, "(VI->BeginField): addr: %.08X | FieldSteps %u | FbSteps %u | ACV %u | Field %s",
xfbAddr, m_HorizontalStepping.FieldSteps, m_HorizontalStepping.FbSteps, m_VerticalTimingRegister.ACV,
@ -781,12 +783,15 @@ static void BeginField(FieldType field)
video->Video_BeginField(xfbAddr, field, fbWidth, fbHeight);
}
/*
static void EndField()
{
Common::PluginVideo* video = CPluginManager::GetInstance().GetVideo();
if (video->IsValid())
video->Video_EndField();
}
*/
// AyuanX: No need to update per scan line, update per frame is good enough, and faster
// Purpose: Send VI interrupt when triggered
// Run when: When a frame is scaned (progressive/interlace)

View File

@ -1584,7 +1584,7 @@ DEFINE_LUA_FUNCTION(memory_getregister, "cpu_dot_registername_string")
{
const char* qualifiedRegisterName = luaL_checkstring(L,1);
lua_settop(L,0);
for(int cpu = 0; cpu < sizeof(cpuToRegisterMaps)/sizeof(*cpuToRegisterMaps); cpu++)
for(unsigned int cpu = 0; cpu < sizeof(cpuToRegisterMaps)/sizeof(*cpuToRegisterMaps); cpu++)
{
cpuToRegisterMap ctrm = cpuToRegisterMaps[cpu];
int cpuNameLen = (int)strlen(ctrm.cpuName);
@ -1617,7 +1617,7 @@ DEFINE_LUA_FUNCTION(memory_setregister, "cpu_dot_registername_string,value")
const char* qualifiedRegisterName = luaL_checkstring(L,1);
unsigned long value = (unsigned long)(luaL_checkinteger(L,2));
lua_settop(L,0);
for(int cpu = 0; cpu < sizeof(cpuToRegisterMaps)/sizeof(*cpuToRegisterMaps); cpu++)
for(unsigned int cpu = 0; cpu < sizeof(cpuToRegisterMaps)/sizeof(*cpuToRegisterMaps); cpu++)
{
cpuToRegisterMap ctrm = cpuToRegisterMaps[cpu];
int cpuNameLen = (int)strlen(ctrm.cpuName);
@ -2095,7 +2095,7 @@ inline int getcolor_unmodified(lua_State *L, int idx, int defaultColor)
if(missing >= 2) color |= 0xFF;
return color;
}
else for(int i = 0; i<sizeof(s_colorMapping)/sizeof(*s_colorMapping); i++)
else for(unsigned int i = 0; i<sizeof(s_colorMapping)/sizeof(*s_colorMapping); i++)
{
if(!strcasecmp(str,s_colorMapping[i].name))
return s_colorMapping[i].value;
@ -3329,7 +3329,7 @@ void registerLibs(lua_State* L)
{
once = false;
for(int i = 0; i < sizeof(cFuncInfo)/sizeof(*cFuncInfo); i++)
for(unsigned int i = 0; i < sizeof(cFuncInfo)/sizeof(*cFuncInfo); i++)
{
const CFuncInfo& cfi = cFuncInfo[i];
if(cfi.registry)
@ -3919,7 +3919,7 @@ static void CallRegisteredLuaMemHook_LuaMatch(unsigned int address, int size, un
#endif
lua_settop(L, 0);
lua_getfield(L, LUA_REGISTRYINDEX, luaMemHookTypeStrings[hookType]);
for(int i = address; i != address+size; i++)
for(unsigned int i = address; i != address+size; i++)
{
lua_rawgeti(L, -1, i);
if (lua_isfunction(L, -1))

View File

@ -174,7 +174,7 @@ static const int FRegAllocSize = sizeof(FRegAllocOrder) / sizeof(X64Reg);
#endif
static X64Reg regFindFreeReg(RegInfo& RI) {
for (unsigned i = 0; i < RegAllocSize; i++)
for (int i = 0; i < RegAllocSize; i++)
if (RI.regs[RegAllocOrder[i]] == 0)
return RegAllocOrder[i];
@ -185,7 +185,7 @@ static X64Reg regFindFreeReg(RegInfo& RI) {
}
static X64Reg fregFindFreeReg(RegInfo& RI) {
for (unsigned i = 0; i < FRegAllocSize; i++)
for (int i = 0; i < FRegAllocSize; i++)
if (RI.fregs[FRegAllocOrder[i]] == 0)
return FRegAllocOrder[i];
static unsigned nextReg = 0;
@ -195,7 +195,7 @@ static X64Reg fregFindFreeReg(RegInfo& RI) {
}
static OpArg regLocForInst(RegInfo& RI, InstLoc I) {
for (unsigned i = 0; i < RegAllocSize; i++)
for (int i = 0; i < RegAllocSize; i++)
if (RI.regs[RegAllocOrder[i]] == I)
return R(RegAllocOrder[i]);
@ -205,7 +205,7 @@ static OpArg regLocForInst(RegInfo& RI, InstLoc I) {
}
static OpArg fregLocForInst(RegInfo& RI, InstLoc I) {
for (unsigned i = 0; i < FRegAllocSize; i++)
for (int i = 0; i < FRegAllocSize; i++)
if (RI.fregs[FRegAllocOrder[i]] == I)
return R(FRegAllocOrder[i]);
@ -215,13 +215,13 @@ static OpArg fregLocForInst(RegInfo& RI, InstLoc I) {
}
static void regClearInst(RegInfo& RI, InstLoc I) {
for (unsigned i = 0; i < RegAllocSize; i++)
for (int i = 0; i < RegAllocSize; i++)
if (RI.regs[RegAllocOrder[i]] == I)
RI.regs[RegAllocOrder[i]] = 0;
}
static void fregClearInst(RegInfo& RI, InstLoc I) {
for (unsigned i = 0; i < FRegAllocSize; i++)
for (int i = 0; i < FRegAllocSize; i++)
if (RI.fregs[FRegAllocOrder[i]] == I)
RI.fregs[FRegAllocOrder[i]] = 0;
}

View File

@ -272,7 +272,7 @@ bool JitBlock::ContainsAddress(u32 em_address)
#endif
if (inst & 0xfc000000) // definitely not a JIT block
return -1;
if (inst >= num_blocks)
if ((int)inst >= num_blocks)
return -1;
if (blocks[inst].originalAddress != addr)
return -1;

View File

@ -98,7 +98,7 @@ void dsp_write_aram_d3(u16 value)
{
// Zelda ucode writes a bunch of zeros to ARAM through d3 during
// initialization. Don't know if it ever does it later, too.
const u32 EndAddress = (g_dsp.ifx_regs[DSP_ACEAH] << 16) | g_dsp.ifx_regs[DSP_ACEAL];
// const u32 EndAddress = (g_dsp.ifx_regs[DSP_ACEAH] << 16) | g_dsp.ifx_regs[DSP_ACEAL]; // Unused?
u32 Address = (g_dsp.ifx_regs[DSP_ACCAH] << 16) | g_dsp.ifx_regs[DSP_ACCAL];
switch (g_dsp.ifx_regs[DSP_FORMAT]) {
case 0xA: // 16-bit writes

View File

@ -398,7 +398,6 @@ void CMemoryView::OnPaint(wxPaintEvent& event)
break;
}
}
size_t len = strlen(dis);
strcat(dis, "\0");
curAddress += 32;
}

View File

@ -156,7 +156,7 @@ CBreakPointBar::CBreakPointBar(CBreakPointWindow* parent, const wxWindowID id, c
void CBreakPointBar::PopulateBar()
{
long Index = InsertItem(IDM_DELETE, _T("Delete"), 0);
InsertItem(IDM_DELETE, _T("Delete"), 0);
InsertItem(IDM_CLEAR, _T("Clear all"), 0);
InsertItem(IDM_ADD_BREAKPOINT, _T("Add BP..."), 1);

View File

@ -150,7 +150,7 @@ IVolume* CreateVolumeFromCryptedWiiImage(IBlobReader& _rReader, u32 _PartitionGr
u64 PartitionsOffset = (u64)Reader.Read32(0x40000 + (_PartitionGroup * 8) + 4) << 2;
// Check if we're looking for a valid partition
if (_VolumeNum != -1 && _VolumeNum > numPartitions)
if ((int)_VolumeNum != -1 && _VolumeNum > numPartitions)
return NULL;
#ifdef _WIN32
@ -203,7 +203,7 @@ IVolume* CreateVolumeFromCryptedWiiImage(IBlobReader& _rReader, u32 _PartitionGr
AES_cbc_encrypt(SubKey, VolumeKey, 16, &AES_KEY, IV, AES_DECRYPT);
// -1 means the caller just wanted the partition with matching type
if (_VolumeNum == -1 || i == _VolumeNum)
if ((int)_VolumeNum == -1 || i == _VolumeNum)
return new CVolumeWiiCrypted(&_rReader, rPartition.Offset + 0x20000, VolumeKey);
}
}

View File

@ -320,13 +320,14 @@ CFrame::CFrame(wxFrame* parent,
: wxFrame(parent, id, title, pos, size, style)
, g_pCodeWindow(NULL)
, m_MenuBar(NULL)
, m_LogWindow(NULL)
, m_ToolBar(NULL), m_ToolBarDebug(NULL), m_ToolBarAui(NULL)
, m_pStatusBar(NULL), m_GameListCtrl(NULL), m_Panel(NULL)
, UseDebugger(_UseDebugger), m_bEdit(false), m_bTabSplit(false), m_bNoDocking(false)
, bRenderToMain(false), bFloatLogWindow(false), bFloatConsoleWindow(false)
, bRenderToMain(false), bNoWiimoteMsg(false)
, HaveLeds(false), HaveSpeakers(false)
, m_bControlsCreated(false), m_bModalDialogOpen(false), bNoWiimoteMsg(false), m_StopDlg(NULL)
, m_ToolBar(NULL), m_ToolBarDebug(NULL), m_ToolBarAui(NULL)
, bFloatLogWindow(false), bFloatConsoleWindow(false)
, m_pStatusBar(NULL), m_GameListCtrl(NULL), m_Panel(NULL)
, m_LogWindow(NULL)
, UseDebugger(_UseDebugger), m_bEdit(false), m_bTabSplit(false), m_bNoDocking(false)
, m_bModalDialogOpen(false), m_bControlsCreated(false), m_StopDlg(NULL)
#if wxUSE_TIMER
#ifdef _WIN32
, m_fLastClickTime(0), m_iLastMotionTime(0), LastMouseX(0), LastMouseY(0)
@ -394,7 +395,7 @@ CFrame::CFrame(wxFrame* parent,
m_Mgr = new wxAuiManager(this, wxAUI_MGR_DEFAULT | wxAUI_MGR_LIVE_RESIZE);
NOTEBOOK_STYLE = wxAUI_NB_TOP | wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_EXTERNAL_MOVE | wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_WINDOWLIST_BUTTON | wxNO_BORDER;
TOOLBAR_STYLE = wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_TEXT /*wxAUI_TB_OVERFLOW overflow visible*/;
wxBitmap aNormalFile = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16));
aNormalFile = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16));
if (g_pCodeWindow)
{
@ -415,13 +416,13 @@ CFrame::CFrame(wxFrame* parent,
}
else
{
IniFile ini; int pos;
IniFile ini; int winpos;
ini.Load(File::GetUserPath(F_LOGGERCONFIG_IDX));
ini.Get("LogWindow", "pos", &pos, 2);
ini.Get("LogWindow", "pos", &winpos, 2);
m_Mgr->GetPane(wxT("Pane 0")).Show().PaneBorder(false).CaptionVisible(false).Layer(0).Center();
m_Mgr->GetPane(wxT("Pane 1")).Hide().PaneBorder(false).CaptionVisible(true).Layer(0)
.FloatingSize(wxSize(600, 350)).CloseButton(false).Direction(pos);
.FloatingSize(wxSize(600, 350)).CloseButton(false).Direction(winpos);
AuiFullscreen = m_Mgr->SavePerspective();
}

View File

@ -367,9 +367,9 @@ void CFrame::DoRemovePageString(wxString Str, bool /*_Hide*/, bool _Destroy)
if (!_Destroy)
{
// Reparent to avoid destruction if the notebook is closed and destroyed
wxWindow * Win = NB->GetPage(j);
wxWindow * NBPageWin = NB->GetPage(j);
NB->RemovePage(j);
Win->Reparent(this);
NBPageWin->Reparent(this);
}
else
{

View File

@ -113,7 +113,7 @@ void CFrame::CreateMenu()
drives = cdio_get_devices();
// Windows Limitation of 24 character drives
for (int i = 0; i < drives.size() && i < 24; i++) {
for (unsigned int i = 0; i < drives.size() && i < 24; i++) {
externalDrive->Append(IDM_DRIVE1 + i, wxString::FromAscii(drives[i].c_str()));
}

View File

@ -148,7 +148,7 @@ void GetPixelShaderId(PIXELSHADERUID *uid, u32 texturemask, u32 dstAlphaEnable)
static void WriteStage(char *&p, int n, u32 texture_mask, u32 HLSL);
static void SampleTexture(char *&p, const char *destination, const char *texcoords, const char *texswap, int texmap, u32 texture_mask, u32 HLSL);
static void WriteAlphaCompare(char *&p, int num, int comp);
// static void WriteAlphaCompare(char *&p, int num, int comp);
static bool WriteAlphaTest(char *&p, u32 HLSL);
static void WriteFog(char *&p);
@ -926,7 +926,7 @@ static bool WriteAlphaTest(char *&p, u32 HLSL)
int compindex = bpmem.alphaFunc.comp0 % 8;
WRITE(p, tevAlphaFuncsTable[compindex],alphaRef[0]);//lookup the first component from the alpha function table
WRITE(p, tevAlphaFunclogicTable[bpmem.alphaFunc.logic % 4]);//lookup the logic op
WRITE(p, "%s", tevAlphaFunclogicTable[bpmem.alphaFunc.logic % 4]);//lookup the logic op
compindex = bpmem.alphaFunc.comp1 % 8;
WRITE(p, tevAlphaFuncsTable[compindex],alphaRef[1]);//lookup the second component from the alpha function table
@ -969,7 +969,7 @@ static void WriteFog(char *&p)
if(bpmem.fog.c_proj_fsel.fsel > 3)
{
WRITE(p, tevFogFuncsTable[bpmem.fog.c_proj_fsel.fsel]);
WRITE(p, "%s", tevFogFuncsTable[bpmem.fog.c_proj_fsel.fsel]);
}
else
{

View File

@ -308,7 +308,7 @@ int main(int argc, const char *argv[])
}
results.append("\n");
results.append("Step [number]:\n[Reg] [last value] [current value]\n\n");
for (int step = 1; step < reg_vector.size()/32; step++)
for (unsigned int step = 1; step < reg_vector.size()/32; step++)
{
bool changed = false;
results.append(StringFromFormat("Step %3d:\n", step));
@ -332,7 +332,7 @@ int main(int argc, const char *argv[])
if (!output_name.empty())
File::WriteStringToFile(true, results, output_name.c_str());
else
printf(results.c_str());
printf("%s", results.c_str());
return 0;
}

View File

@ -26,13 +26,14 @@
void CUCode_Zelda::RenderSynth_RectWave(ZeldaVoicePB &PB, s32* _Buffer, int _Size)
{
float ratioFactor = 32000.0f / (float)soundStream->GetMixer()->GetSampleRate();
float _ratioFactor = 32000.0f / (float)soundStream->GetMixer()->GetSampleRate();
u32 _ratio = (PB.RatioInt << 16);
s64 ratio = (_ratio * ratioFactor) * 16;
s64 ratio = (_ratio * _ratioFactor) * 16;
s64 TrueSamplePosition = PB.CurSampleFrac;
// PB.Format == 0x3 -> Rectangular Wave, 0x0 -> Square Wave
int mask = PB.Format ? 3 : 1, shift = PB.Format ? 2 : 1;
unsigned int mask = PB.Format ? 3 : 1;
// int shift = PB.Format ? 2 : 1; // Unused?
u32 pos[2] = {0, 0};
int i = 0;

View File

@ -60,9 +60,9 @@ void CUCode_Zelda::WritebackVoicePB(u32 _Addr, ZeldaVoicePB& PB)
int CUCode_Zelda::ConvertRatio(int pb_ratio)
{
float ratioFactor = 32000.0f / (float)soundStream->GetMixer()->GetSampleRate();
float _ratioFactor = 32000.0f / (float)soundStream->GetMixer()->GetSampleRate();
u32 _ratio = (pb_ratio << 16);
return (u64)((_ratio * ratioFactor) * 16) >> 16;
return (u64)((_ratio * _ratioFactor) * 16) >> 16;
}
int CUCode_Zelda::SizeForResampling(ZeldaVoicePB &PB, int size, int ratio) {
@ -648,7 +648,7 @@ ContinueWithBlock:
// The 8 buffers to mix to: 0d00, 0d60, 0f40 0ca0 0e80 0ee0 0c00 0c50
// We just mix to the first two and call it stereo :p
int value = b00[0x4 + count];
int delta = b00[0xC + count] << 11;
//int delta = b00[0xC + count] << 11; // Unused?
int ramp = value << 16;
for (int i = 0; i < _Size; i++)

View File

@ -157,7 +157,7 @@ bool ReadAnnotatedAssembly(const char *filename)
else
{
// Remove hex notation
if (i == first_hex + 3 &&
if ((int)i == first_hex + 3 &&
(first_hex == 0 || line[first_hex - 1] != 'x') &&
(i >= len - 1 || line[i + 1] == ' '))
{

View File

@ -363,7 +363,7 @@ void FramebufferManager::copyToVirtualXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight
// Add the new Virtual XFB to the list
if (m_virtualXFBList.size() >= MAX_VIRTUAL_XFB)
if ((int)m_virtualXFBList.size() >= MAX_VIRTUAL_XFB)
{
// List overflowed; delete the oldest.
glDeleteTextures(1, &m_virtualXFBList.back().xfbSource.texture);

View File

@ -113,11 +113,10 @@ namespace Clipper
int idxPrev = inlist[0]; \
float dpPrev = CLIP_DOTPROD(idxPrev, A, B, C, D ); \
int outcount = 0; \
int i; \
\
inlist[n] = inlist[0]; \
for (i = 1; i <= n; i++) { \
int idx = inlist[i]; \
for (int j = 1; j <= n; j++) { \
int idx = inlist[j]; \
float dp = CLIP_DOTPROD(idx, A, B, C, D ); \
if (dpPrev >= 0) { \
outlist[outcount++] = idxPrev; \
@ -190,10 +189,10 @@ namespace Clipper
indices[0] = inlist[0];
indices[1] = inlist[1];
indices[2] = inlist[2];
for (int i = 3; i < n; ++i) {
for (int j = 3; j < n; ++j) {
indices[numIndices++] = inlist[0];
indices[numIndices++] = inlist[i - 1];
indices[numIndices++] = inlist[i];
indices[numIndices++] = inlist[j - 1];
indices[numIndices++] = inlist[j];
}
}
}

View File

@ -327,7 +327,7 @@ void UpdateInterruptsFromVideoPlugin(u64 userdata)
void ReadFifo()
{
bool canRead = cpreg.readptr != cpreg.writeptr && writePos < maxCommandBufferWrite;
bool canRead = cpreg.readptr != cpreg.writeptr && writePos < (int)maxCommandBufferWrite;
bool atBreakpoint = AtBreakpoint();
if (canRead && !atBreakpoint)
@ -354,7 +354,7 @@ void ReadFifo()
ptr += GATHER_PIPE_SIZE;
}
canRead = cpreg.readptr != cpreg.writeptr && writePos < maxCommandBufferWrite;
canRead = cpreg.readptr != cpreg.writeptr && writePos < (int)maxCommandBufferWrite;
atBreakpoint = AtBreakpoint();
} while (canRead && !atBreakpoint);

View File

@ -352,7 +352,8 @@ int Initialize()
// WiiUse initializes the Wiimotes in Windows right from the wiiuse_find function
// The Functionality should REALLY be changed
#ifndef _WIN32
int Connect = wiiuse_connect(g_WiiMotesFromWiiUse, MAX_WIIMOTES);
int Connect;
Connect = wiiuse_connect(g_WiiMotesFromWiiUse, MAX_WIIMOTES);
DEBUG_LOG(WIIMOTE, "Connected: %i", Connect);
#endif