mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-17 07:31:01 +00:00
Fix some type comparison warnings.
This commit is contained in:
parent
f68f1e2482
commit
3e18027b8d
@ -203,7 +203,7 @@ CChunkFileReader::Error CChunkFileReader::LoadFile(const std::string& _rFilename
|
||||
sz = (int)(fileSize - headerSize);
|
||||
if (header.ExpectedSize != sz)
|
||||
{
|
||||
ERROR_LOG(COMMON, "ChunkReader: Bad file size, got %d expected %d", sz, header.ExpectedSize);
|
||||
ERROR_LOG(COMMON, "ChunkReader: Bad file size, got %u expected %u", (u32)sz, header.ExpectedSize);
|
||||
return ERROR_BAD_FILE;
|
||||
}
|
||||
|
||||
@ -220,8 +220,8 @@ CChunkFileReader::Error CChunkFileReader::LoadFile(const std::string& _rFilename
|
||||
u8 *uncomp_buffer = new u8[header.UncompressedSize];
|
||||
size_t uncomp_size = header.UncompressedSize;
|
||||
snappy_uncompress((const char *)buffer, sz, (char *)uncomp_buffer, &uncomp_size);
|
||||
if ((int)uncomp_size != header.UncompressedSize) {
|
||||
ERROR_LOG(COMMON, "Size mismatch: file: %i calc: %i", (int)header.UncompressedSize, (int)uncomp_size);
|
||||
if ((u32)uncomp_size != header.UncompressedSize) {
|
||||
ERROR_LOG(COMMON, "Size mismatch: file: %u calc: %u", header.UncompressedSize, (u32)uncomp_size);
|
||||
return ERROR_BAD_FILE;
|
||||
}
|
||||
_buffer = uncomp_buffer;
|
||||
@ -248,8 +248,8 @@ CChunkFileReader::Error CChunkFileReader::SaveFile(const std::string& _rFilename
|
||||
SChunkHeader header;
|
||||
header.Compress = compress ? 1 : 0;
|
||||
header.Revision = _Revision;
|
||||
header.ExpectedSize = (int)sz;
|
||||
header.UncompressedSize = (int)sz;
|
||||
header.ExpectedSize = (u32)sz;
|
||||
header.UncompressedSize = (u32)sz;
|
||||
strncpy(header.GitVersion, _VersionString, 32);
|
||||
header.GitVersion[31] = '\0';
|
||||
|
||||
@ -259,7 +259,7 @@ CChunkFileReader::Error CChunkFileReader::SaveFile(const std::string& _rFilename
|
||||
u8 *compressed_buffer = new u8[comp_len];
|
||||
snappy_compress((const char *)buffer, sz, (char *)compressed_buffer, &comp_len);
|
||||
delete [] buffer;
|
||||
header.ExpectedSize = (int)comp_len;
|
||||
header.ExpectedSize = (u32)comp_len;
|
||||
if (!pFile.WriteArray(&header, 1))
|
||||
{
|
||||
ERROR_LOG(COMMON, "ChunkReader: Failed writing header");
|
||||
|
@ -651,8 +651,8 @@ private:
|
||||
{
|
||||
int Revision;
|
||||
int Compress;
|
||||
int ExpectedSize;
|
||||
int UncompressedSize;
|
||||
u32 ExpectedSize;
|
||||
u32 UncompressedSize;
|
||||
char GitVersion[32];
|
||||
};
|
||||
};
|
||||
|
@ -88,7 +88,7 @@ static const LogNameTableEntry logTable[] = {
|
||||
LogManager::LogManager() {
|
||||
for (size_t i = 0; i < ARRAY_SIZE(logTable); i++) {
|
||||
if (i != logTable[i].logType) {
|
||||
FLOG("Bad logtable at %i", i);
|
||||
FLOG("Bad logtable at %i", (int)i);
|
||||
}
|
||||
log_[logTable[i].logType] = new LogChannel(logTable[i].name, logTable[i].longName);
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ void QtHost::SendGPUWait(u32 cmd, u32 addr, void *data)
|
||||
EmuThread_LockDraw(true);
|
||||
}
|
||||
|
||||
void QtHost::SetGPUStep(bool value, int flag, int data)
|
||||
void QtHost::SetGPUStep(bool value, int flag, u32 data)
|
||||
{
|
||||
m_GPUStep = value;
|
||||
m_GPUFlag = flag;
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
bool GpuStep();
|
||||
void SendGPUWait(u32 cmd, u32 addr, void* data);
|
||||
void SendGPUStart();
|
||||
void SetGPUStep(bool value, int flag = 0, int data = 0);
|
||||
void SetGPUStep(bool value, int flag = 0, u32 data = 0);
|
||||
void NextGPUStep();
|
||||
|
||||
signals:
|
||||
@ -62,7 +62,7 @@ private:
|
||||
MainWindow* mainWindow;
|
||||
bool m_GPUStep;
|
||||
int m_GPUFlag;
|
||||
int m_GPUData;
|
||||
u32 m_GPUData;
|
||||
};
|
||||
|
||||
#endif // QTAPP_H
|
||||
|
@ -289,7 +289,7 @@ void Debugger_Disasm::on_GotoLr_clicked()
|
||||
void Debugger_Disasm::on_GotoInt_currentIndexChanged(int index)
|
||||
{
|
||||
CtrlDisAsmView *ptr = ui->DisasmView;
|
||||
int addr = ui->GotoInt->itemData(index,Qt::UserRole).toInt();
|
||||
u32 addr = ui->GotoInt->itemData(index,Qt::UserRole).toInt();
|
||||
if (addr != 0xFFFFFFFF)
|
||||
ptr->gotoAddr(addr);
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ void Debugger_DisplayList::ShowDLCode()
|
||||
std::set<u32> usedTexAddr;
|
||||
std::set<u32> usedVtxAddr;
|
||||
std::set<u32> usedIdxAddr;
|
||||
for(int i = 0; i < drawGPUState.size(); i++)
|
||||
for(int i = 0; i < (int)drawGPUState.size(); i++)
|
||||
{
|
||||
// Textures
|
||||
QTreeWidgetItem* item = new QTreeWidgetItem();
|
||||
|
Loading…
x
Reference in New Issue
Block a user