Fix some x64 type warnings.

This commit is contained in:
Unknown W. Brackets 2013-02-24 10:38:30 -08:00
parent 64c42ffaf2
commit de7ada1982
9 changed files with 15 additions and 15 deletions

View File

@ -313,19 +313,19 @@ void ConsoleListener::SendToThread(LogTypes::LOG_LEVELS Level, const char *Text)
if (logPendingWritePos == (u32) -1)
return;
size_t Len = strlen(Text);
int Len = (int)strlen(Text);
if (Len > LOG_PENDING_MAX)
Len = LOG_PENDING_MAX - 16;
char ColorAttr[16] = "";
size_t ColorLen = 0;
int ColorLen = 0;
if (bUseColor)
{
// Not ANSI, since the console doesn't support it, but ANSI-like.
snprintf(ColorAttr, 16, "\033%d", Level);
// For now, rather than properly support it.
_dbg_assert_msg_(COMMON, strlen(ColorAttr) == 2, "Console logging doesn't support > 9 levels.");
ColorLen = strlen(ColorAttr);
ColorLen = (int)strlen(ColorAttr);
}
EnterCriticalSection(&criticalSection);
@ -333,7 +333,7 @@ void ConsoleListener::SendToThread(LogTypes::LOG_LEVELS Level, const char *Text)
u32 prevLogWritePos = logWritePos;
if (logWritePos + ColorLen + Len >= LOG_PENDING_MAX)
{
for (size_t i = 0; i < ColorLen; ++i)
for (int i = 0; i < ColorLen; ++i)
logPending[(logWritePos + i) % LOG_PENDING_MAX] = ColorAttr[i];
logWritePos += ColorLen;
if (logWritePos >= LOG_PENDING_MAX)
@ -370,7 +370,7 @@ void ConsoleListener::SendToThread(LogTypes::LOG_LEVELS Level, const char *Text)
// Okay, have it go right after the next newline.
if (nextNewline != NULL)
logPendingReadPos = nextNewline - logPending + 1;
logPendingReadPos = (u32)(nextNewline - logPending + 1);
}
// Double check we didn't start quitting.

View File

@ -146,7 +146,7 @@ void CBreakPoints::InvalidateJit()
int CBreakPoints::GetNumBreakpoints()
{
return m_iBreakPoints.size();
return (int)m_iBreakPoints.size();
}
int CBreakPoints::GetBreakpointAddress(int i)

View File

@ -229,7 +229,7 @@ int PSPOskDialog::Update()
Memory::Write_U16(value, oskData.outtextPtr + (2 * i));
}
oskData.outtextlength = inputChars.size();
oskData.outtextlength = (u32)inputChars.size();
oskParams.base.result= 0;
oskData.result = PSP_UTILITY_OSK_RESULT_CHANGED;
Memory::WriteStruct(oskParams.SceUtilityOskDataPtr, &oskData);

View File

@ -57,7 +57,7 @@ struct Syscall
#define RETURNF(fl) currentMIPS->f[0]=fl
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0])
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
#endif
#include "FunctionWrappers.h"

View File

@ -213,7 +213,7 @@ void __InterruptsInit()
{
interruptsEnabled = 1;
inInterrupt = false;
for (size_t i = 0; i < ARRAY_SIZE(intrHandlers); ++i)
for (int i = 0; i < (int)ARRAY_SIZE(intrHandlers); ++i)
intrHandlers[i] = new IntrHandler(i);
intState.clear();
}

View File

@ -1216,7 +1216,7 @@ u32 __KernelDeleteThread(SceUID threadID, int exitStatus, const char *reason, bo
{
// TODO: Unless they should be run before deletion?
for (int i = 0; i < THREAD_CALLBACK_NUM_TYPES; i++)
readyCallbacksCount -= t->readyCallbacks[i].size();
readyCallbacksCount -= (int)t->readyCallbacks[i].size();
}
return kernelObjects.Destroy<Thread>(threadID);

View File

@ -965,8 +965,8 @@ void GLES_GPU::UpdateStats() {
gpuStats.numVertexShaders = shaderManager_->NumVertexShaders();
gpuStats.numFragmentShaders = shaderManager_->NumFragmentShaders();
gpuStats.numShaders = shaderManager_->NumPrograms();
gpuStats.numTextures = textureCache_.NumLoadedTextures();
gpuStats.numFBOs = framebufferManager_.NumVFBs();
gpuStats.numTextures = (int)textureCache_.NumLoadedTextures();
gpuStats.numFBOs = (int)framebufferManager_.NumVFBs();
}
void GLES_GPU::DoBlockTransfer() {

View File

@ -926,7 +926,7 @@ void TransformDrawEngine::Flush() {
gpuStats.numFlushes++;
gpuStats.numTrackedVertexArrays = vai_.size();
gpuStats.numTrackedVertexArrays = (int)vai_.size();
// TODO: This should not be done on every drawcall, we should collect vertex data
// until critical state changes. That's when we draw (flush).

View File

@ -66,11 +66,11 @@ CDisasm::CDisasm(HINSTANCE _hInstance, HWND _hParent, DebugInterface *_cpu) : Di
tcItem.mask = TCIF_TEXT;
tcItem.dwState = 0;
tcItem.pszText = "Regs";
tcItem.cchTextMax = strlen(tcItem.pszText)+1;
tcItem.cchTextMax = (int)strlen(tcItem.pszText)+1;
tcItem.iImage = 0;
int result1 = TabCtrl_InsertItem(tabs, TabCtrl_GetItemCount(tabs),&tcItem);
tcItem.pszText = "Funcs";
tcItem.cchTextMax = strlen(tcItem.pszText)+1;
tcItem.cchTextMax = (int)strlen(tcItem.pszText)+1;
int result2 = TabCtrl_InsertItem(tabs, TabCtrl_GetItemCount(tabs),&tcItem);
ShowWindow(GetDlgItem(m_hDlg, IDC_REGLIST), SW_NORMAL);
ShowWindow(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST), SW_HIDE);