From 1a89c26dc0ec6e8ad4597d5d952d25318bae3db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 3 Oct 2024 18:18:02 +0200 Subject: [PATCH] Warning fixes --- Core/Dialog/SavedataParam.cpp | 2 +- Core/MIPS/IR/IRRegCache.h | 2 +- Core/MIPS/x86/X64IRRegCache.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/Dialog/SavedataParam.cpp b/Core/Dialog/SavedataParam.cpp index 89a5886b72..12a2eec522 100644 --- a/Core/Dialog/SavedataParam.cpp +++ b/Core/Dialog/SavedataParam.cpp @@ -337,7 +337,7 @@ bool SavedataParam::Delete(SceUtilitySavedataParam* param, int saveId) { std::string dirPath = GetSaveFilePath(param, GetSaveDir(saveId)); if (dirPath.size() == 0) { - ERROR_LOG(Log::sceUtility, "GetSaveFilePath (%.*s) returned empty - cannot delete save directory. Might already be deleted?", sizeof(param->gameName), param->gameName); + ERROR_LOG(Log::sceUtility, "GetSaveFilePath (%.*s) returned empty - cannot delete save directory. Might already be deleted?", (int)sizeof(param->gameName), param->gameName); return false; } diff --git a/Core/MIPS/IR/IRRegCache.h b/Core/MIPS/IR/IRRegCache.h index 742d1cae33..addd31d233 100644 --- a/Core/MIPS/IR/IRRegCache.h +++ b/Core/MIPS/IR/IRRegCache.h @@ -31,7 +31,7 @@ constexpr int TOTAL_MAPPABLE_IRREGS = 256; // Arbitrary - increase if your backend has more. constexpr int TOTAL_POSSIBLE_NATIVEREGS = 128; -typedef int8_t IRNativeReg; +typedef int8_t IRNativeReg; // invalid value is -1 constexpr IRReg IRREG_INVALID = 255; diff --git a/Core/MIPS/x86/X64IRRegCache.cpp b/Core/MIPS/x86/X64IRRegCache.cpp index 8ea13ef775..02afe8a663 100644 --- a/Core/MIPS/x86/X64IRRegCache.cpp +++ b/Core/MIPS/x86/X64IRRegCache.cpp @@ -265,7 +265,7 @@ X64Reg X64IRRegCache::GetAndLockTempFPR() { void X64IRRegCache::ReserveAndLockXGPR(Gen::X64Reg r) { IRNativeReg nreg = GPRToNativeReg(r); - if (nr[nreg].mipsReg != -1) + if (nr[nreg].mipsReg != IRREG_INVALID) FlushNativeReg(nreg); nr[r].tempLockIRIndex = irIndex_; }