diff --git a/Core/HLE/sceMpeg.cpp b/Core/HLE/sceMpeg.cpp index 31cfe03683..df85028a4d 100644 --- a/Core/HLE/sceMpeg.cpp +++ b/Core/HLE/sceMpeg.cpp @@ -163,7 +163,7 @@ typedef std::map StreamInfoMap; // Internal structure struct MpegContext { - MpegContext() : mediaengine(nullptr), ringbufferNeedsReverse(false) { + MpegContext() : ringbufferNeedsReverse(false), mediaengine(nullptr) { memcpy(mpegheader, defaultMpegheader, 2048); } ~MpegContext() { diff --git a/Core/HLE/sceNetAdhoc.cpp b/Core/HLE/sceNetAdhoc.cpp index 5c7c5c55d4..b18e81c208 100644 --- a/Core/HLE/sceNetAdhoc.cpp +++ b/Core/HLE/sceNetAdhoc.cpp @@ -712,7 +712,7 @@ int sceNetAdhocPollSocket(u32 socketStructAddr, int count, int timeout, int nonb if (timeout == 0) timeout = 1; int affectedsockets = 0; - if (count > FD_SETSIZE) count = FD_SETSIZE; // return affectedsockets; + if (count > (int)FD_SETSIZE) count = FD_SETSIZE; // return affectedsockets; // Acquire Network Lock //acquireNetworkLock(); diff --git a/Core/HLE/scePsmf.cpp b/Core/HLE/scePsmf.cpp index 45945a4357..9b3796701c 100644 --- a/Core/HLE/scePsmf.cpp +++ b/Core/HLE/scePsmf.cpp @@ -834,7 +834,7 @@ static u32 scePsmfGetCurrentStreamType(u32 psmfStruct, u32 typeAddr, u32 channel if (!psmf) { return hleLogError(ME, ERROR_PSMF_NOT_INITIALIZED, "invalid psmf"); } - if (psmf->currentStreamNum == ERROR_PSMF_NOT_INITIALIZED) { + if (psmf->currentStreamNum == (int)ERROR_PSMF_NOT_INITIALIZED) { return hleLogError(ME, ERROR_PSMF_NOT_INITIALIZED, "no stream set"); } if (!Memory::IsValidAddress(typeAddr) || !Memory::IsValidAddress(channelAddr)) { diff --git a/Core/MIPS/ARM/ArmRegCacheFPU.cpp b/Core/MIPS/ARM/ArmRegCacheFPU.cpp index cde3cb11e6..a664cfa16a 100644 --- a/Core/MIPS/ARM/ArmRegCacheFPU.cpp +++ b/Core/MIPS/ARM/ArmRegCacheFPU.cpp @@ -27,7 +27,7 @@ using namespace ArmGen; using namespace ArmJitConstants; -ArmRegCacheFPU::ArmRegCacheFPU(MIPSState *mips, MIPSComp::JitState *js, MIPSComp::JitOptions *jo) : mips_(mips), vr(mr + 32), js_(js), jo_(jo), initialReady(false) { +ArmRegCacheFPU::ArmRegCacheFPU(MIPSState *mips, MIPSComp::JitState *js, MIPSComp::JitOptions *jo) : mips_(mips), js_(js), jo_(jo), vr(mr + 32), initialReady(false) { if (cpu_info.bNEON) { numARMFpuReg_ = 32; } else { diff --git a/Core/MIPS/IR/IRInterpreter.cpp b/Core/MIPS/IR/IRInterpreter.cpp index 74e8c98925..89825e3e4e 100644 --- a/Core/MIPS/IR/IRInterpreter.cpp +++ b/Core/MIPS/IR/IRInterpreter.cpp @@ -371,7 +371,7 @@ u32 IRInterpret(MIPSState *mips, const IRInst *inst, const u32 *constPool, int c break; case IROp::FCmovVfpuCC: - if (((mips->vfpuCtrl[VFPU_CTRL_CC] >> (inst->src2 & 0xf)) & 1) == (inst->src2 >> 7)) { + if (((mips->vfpuCtrl[VFPU_CTRL_CC] >> (inst->src2 & 0xf)) & 1) == ((u32)inst->src2 >> 7)) { mips->f[inst->dest] = mips->f[inst->src1]; } break; diff --git a/Core/MIPS/IR/IRJit.cpp b/Core/MIPS/IR/IRJit.cpp index b29c6a39b1..7832456ab5 100644 --- a/Core/MIPS/IR/IRJit.cpp +++ b/Core/MIPS/IR/IRJit.cpp @@ -37,7 +37,7 @@ namespace MIPSComp { -IRJit::IRJit(MIPSState *mips) : mips_(mips), frontend_(mips->HasDefaultPrefix()) { +IRJit::IRJit(MIPSState *mips) : frontend_(mips->HasDefaultPrefix()), mips_(mips) { u32 size = 128 * 1024; // blTrampolines_ = kernelMemory.Alloc(size, true, "trampoline"); InitIR(); diff --git a/Core/MIPS/IR/IRJit.h b/Core/MIPS/IR/IRJit.h index ba26c9abea..dfefbbc00e 100644 --- a/Core/MIPS/IR/IRJit.h +++ b/Core/MIPS/IR/IRJit.h @@ -38,7 +38,7 @@ namespace MIPSComp { class IRBlock { public: IRBlock() : instr_(nullptr), const_(nullptr), numInstructions_(0), numConstants_(0), origAddr_(0), origSize_(0) {} - IRBlock(u32 emAddr) : instr_(nullptr), const_(nullptr), origAddr_(emAddr), origSize_(0), numInstructions_(0) {} + IRBlock(u32 emAddr) : instr_(nullptr), const_(nullptr), numInstructions_(0), numConstants_(0), origAddr_(emAddr), origSize_(0) {} IRBlock(IRBlock &&b) { instr_ = b.instr_; const_ = b.const_; diff --git a/Core/TextureReplacer.h b/Core/TextureReplacer.h index c90b9efa0d..b7c9ef355e 100644 --- a/Core/TextureReplacer.h +++ b/Core/TextureReplacer.h @@ -88,7 +88,7 @@ struct ReplacementAliasKey { }; }; - ReplacementAliasKey(u64 c, u32 h, u32 l) : cachekey(c), hash(h), level(l) { + ReplacementAliasKey(u64 c, u32 h, u32 l) : cachekey(c), level(l), hash(h) { } bool operator ==(const ReplacementAliasKey &k) const { diff --git a/GPU/Common/VertexDecoderArm.cpp b/GPU/Common/VertexDecoderArm.cpp index 3ff26add46..6b8aefc32c 100644 --- a/GPU/Common/VertexDecoderArm.cpp +++ b/GPU/Common/VertexDecoderArm.cpp @@ -185,6 +185,9 @@ JittedVertexDecoder VertexDecoderJitCache::Compile(const VertexDecoder &dec, int } } + // Not used below, but useful for logging. + (void)skinning; + SetCC(CC_AL); PUSH(6, R4, R5, R6, R7, R8, R_LR); diff --git a/GPU/Common/VertexDecoderArm64.cpp b/GPU/Common/VertexDecoderArm64.cpp index 20303b7a44..4cff5ca12a 100644 --- a/GPU/Common/VertexDecoderArm64.cpp +++ b/GPU/Common/VertexDecoderArm64.cpp @@ -165,6 +165,9 @@ JittedVertexDecoder VertexDecoderJitCache::Compile(const VertexDecoder &dec, int } } + // Not used below, but useful for logging. + (void)skinning; + // if (skinning) log = true; BitSet32 regs_to_save(Arm64Gen::ALL_CALLEE_SAVED); diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index fad46a9185..bdab8dc29c 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -244,8 +244,8 @@ FramebufferManager::FramebufferManager() : postShaderProgram_(nullptr), stencilUploadProgram_(nullptr), timeLoc_(-1), - deltaLoc_(-1), pixelDeltaLoc_(-1), + deltaLoc_(-1), textureCache_(nullptr), shaderManager_(nullptr), resized_(false), diff --git a/GPU/GPU.cpp b/GPU/GPU.cpp index 53c4d215aa..39a6998bf9 100644 --- a/GPU/GPU.cpp +++ b/GPU/GPU.cpp @@ -64,11 +64,11 @@ bool GPU_Init(GraphicsContext *ctx, Thin3DContext *thin3d) { break; case GPUCORE_DIRECTX11: return false; -#ifndef NO_VULKAN case GPUCORE_VULKAN: +#ifndef NO_VULKAN SetGPU(new GPU_Vulkan(ctx)); - break; #endif + break; } return gpu != NULL; diff --git a/UI/BackgroundAudio.cpp b/UI/BackgroundAudio.cpp index 89552ec9f6..58351d85de 100644 --- a/UI/BackgroundAudio.cpp +++ b/UI/BackgroundAudio.cpp @@ -56,6 +56,10 @@ public: raw_bytes_per_frame_ = temp & 0xFFFF; Nothing = temp >> 16; + // Not currently used, but part of the format. + (void)avgBytesPerSec; + (void)Nothing; + if (codec == PSP_CODEC_AT3) { // The first two bytes are actually not a useful part of the extradata. // We already read 16 bytes, so make sure there's enough left. diff --git a/UI/CwCheatScreen.cpp b/UI/CwCheatScreen.cpp index ecb1f35010..2647f20ad9 100644 --- a/UI/CwCheatScreen.cpp +++ b/UI/CwCheatScreen.cpp @@ -56,7 +56,7 @@ void CwCheatScreen::CreateCodeList() { std::size_t lslash = gamePath_.find_last_of("/"); std::size_t lastdot = gamePath_.find_last_of("."); std::string extension = gamePath_.substr(lastdot + 1); - for (int i = 0; i < extension.size(); i++) { + for (size_t i = 0; i < extension.size(); i++) { extension[i] = tolower(extension[i]); } if ((extension != "iso" && extension != "cso" && extension != "pbp") || gameTitle == "") { diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index d25a46df4c..61cb3b03f5 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -68,7 +68,7 @@ extern bool targetIsJailbroken; #endif GameSettingsScreen::GameSettingsScreen(std::string gamePath, std::string gameID, bool editThenRestore) - : UIDialogScreenWithGameBackground(gamePath), gameID_(gameID), enableReports_(false), bEditThenRestore(editThenRestore) { + : UIDialogScreenWithGameBackground(gamePath), gameID_(gameID), enableReports_(false), editThenRestore_(editThenRestore) { lastVertical_ = UseVerticalLayout(); } @@ -79,8 +79,7 @@ bool GameSettingsScreen::UseVerticalLayout() const { void GameSettingsScreen::CreateViews() { GameInfo *info = g_gameInfoCache->GetInfo(NULL, gamePath_, GAMEINFO_WANTBG | GAMEINFO_WANTSIZE); - if (bEditThenRestore) - { + if (editThenRestore_) { g_Config.loadGameConfig(gameID_); } @@ -871,8 +870,7 @@ void GameSettingsScreen::onFinish(DialogResult result) { Reporting::Enable(enableReports_, "report.ppsspp.org"); Reporting::UpdateConfig(); g_Config.Save(); - if (bEditThenRestore) - { + if (editThenRestore_) { g_Config.unloadGameConfig(); } diff --git a/UI/GameSettingsScreen.h b/UI/GameSettingsScreen.h index 5600382e78..b164dc55b7 100644 --- a/UI/GameSettingsScreen.h +++ b/UI/GameSettingsScreen.h @@ -40,8 +40,6 @@ protected: private: std::string gameID_; - //edit the game-specific settings and restore the global settings after exiting - bool bEditThenRestore; bool lastVertical_; UI::CheckBox *enableReportsCheckbox_; UI::Choice *layoutEditorChoice_; @@ -107,6 +105,9 @@ private: int iAlternateSpeedPercent_; bool enableReports_; + //edit the game-specific settings and restore the global settings after exiting + bool editThenRestore_; + // Cached booleans bool vtxCacheEnable_; bool postProcEnable_; diff --git a/UI/PauseScreen.cpp b/UI/PauseScreen.cpp index d843e86302..ebb08d44e0 100644 --- a/UI/PauseScreen.cpp +++ b/UI/PauseScreen.cpp @@ -179,7 +179,7 @@ private: std::string screenshotFilename_; }; -SaveSlotView::SaveSlotView(const std::string &gameFilename, int slot, UI::LayoutParams *layoutParams) : UI::LinearLayout(UI::ORIENT_HORIZONTAL, layoutParams), gamePath_(gameFilename), slot_(slot) { +SaveSlotView::SaveSlotView(const std::string &gameFilename, int slot, UI::LayoutParams *layoutParams) : UI::LinearLayout(UI::ORIENT_HORIZONTAL, layoutParams), slot_(slot), gamePath_(gameFilename) { using namespace UI; screenshotFilename_ = SaveState::GenerateSaveSlotFilename(gamePath_, slot, SaveState::SCREENSHOT_EXTENSION); diff --git a/UI/SavedataScreen.h b/UI/SavedataScreen.h index 14e4afe4c0..cbc190b9da 100644 --- a/UI/SavedataScreen.h +++ b/UI/SavedataScreen.h @@ -36,8 +36,8 @@ private: void Refresh(); UI::EventReturn SavedataButtonClick(UI::EventParams &e); - std::string path_; UI::ViewGroup *gameList_; + std::string path_; }; class SavedataScreen : public UIDialogScreenWithGameBackground { diff --git a/ext/native/file/chunk_file.cpp b/ext/native/file/chunk_file.cpp index 4026208c21..94e700538a 100644 --- a/ext/native/file/chunk_file.cpp +++ b/ext/native/file/chunk_file.cpp @@ -169,7 +169,7 @@ void ChunkFile::readData(void *what, int count) { if (fastMode) { memcpy(what, data + pos, count); } else { - if (fread(what, 1, count, file) != count) { + if (fread(what, 1, count, file) != (size_t)count) { ELOG("Failed to read complete %d bytes", count); } } diff --git a/ext/native/gfx_es2/draw_buffer.cpp b/ext/native/gfx_es2/draw_buffer.cpp index dad19e0dbc..ff1cd4c3f1 100644 --- a/ext/native/gfx_es2/draw_buffer.cpp +++ b/ext/native/gfx_es2/draw_buffer.cpp @@ -347,7 +347,7 @@ protected: float AtlasWordWrapper::MeasureWidth(const char *str, size_t bytes) { float w = 0.0f; - for (UTF8 utf(str); utf.byteIndex() < bytes; ) { + for (UTF8 utf(str); utf.byteIndex() < (int)bytes; ) { const AtlasChar *ch = atlasfont_.getChar(utf.next()); if (!ch) ch = atlasfont_.getChar('?'); diff --git a/ext/native/net/sinks.cpp b/ext/native/net/sinks.cpp index ef9d8743e6..39339c87b4 100644 --- a/ext/native/net/sinks.cpp +++ b/ext/native/net/sinks.cpp @@ -268,13 +268,13 @@ bool OutputSink::Printf(const char *fmt, ...) { bool success = true; int result = vsnprintf(buf_ + write_, avail, fmt, args); - if (result >= avail) { + if (result >= (int)avail) { // There wasn't enough space. Let's use a buffer instead. // This could be caused by wraparound. char temp[BUFFER_SIZE]; result = vsnprintf(temp, BUFFER_SIZE, fmt, args); - if (result < BUFFER_SIZE && result > 0) { + if ((size_t)result < BUFFER_SIZE && result > 0) { // In case it did return the null terminator. if (temp[result - 1] == '\0') { result--; @@ -289,7 +289,7 @@ bool OutputSink::Printf(const char *fmt, ...) { va_end(backup); // Okay, did we actually write? - if (result >= avail) { + if (result >= (int)avail) { // This means the result string was too big for the buffer. ELOG("Not enough space to format output."); return false; diff --git a/ext/native/ui/ui_screen.cpp b/ext/native/ui/ui_screen.cpp index b06117658c..0e810a0556 100644 --- a/ext/native/ui/ui_screen.cpp +++ b/ext/native/ui/ui_screen.cpp @@ -626,7 +626,7 @@ void SliderFloatPopupScreen::OnCompleted(DialogResult result) { } PopupTextInputChoice::PopupTextInputChoice(std::string *value, const std::string &title, const std::string &placeholder, int maxLen, ScreenManager *screenManager, LayoutParams *layoutParams) -: Choice(title, "", false, layoutParams), value_(value), placeHolder_(placeholder), screenManager_(screenManager), maxLen_(maxLen) { +: Choice(title, "", false, layoutParams), screenManager_(screenManager), value_(value), placeHolder_(placeholder), maxLen_(maxLen) { OnClick.Handle(this, &PopupTextInputChoice::HandleClick); }