From 55eee26c52ffb0c2d5797bf439a9e77f9c1bb220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 3 Aug 2026 12:20:58 +0200 Subject: [PATCH] Assorted warning fixes --- Core/HLE/sceAudiocodec.cpp | 2 +- Core/HLE/sceKernel.cpp | 2 +- Core/Util/GameManager.h | 4 ++-- UI/InstallZipScreen.cpp | 5 ----- UI/NativeApp.cpp | 3 --- 5 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Core/HLE/sceAudiocodec.cpp b/Core/HLE/sceAudiocodec.cpp index a8ae37276a..bf513beb3c 100644 --- a/Core/HLE/sceAudiocodec.cpp +++ b/Core/HLE/sceAudiocodec.cpp @@ -267,7 +267,7 @@ static int sceAudiocodecDecode(u32 ctxPtr, int codec) { ctx->srcBytesRead = inDataConsumed; ctx->dstSamplesWritten = outSamples; } - return hleLogDebug(Log::ME, 0, "codec %s", GetCodecName(codec)); + return hleLogDebug(Log::ME, 0, "codec %s sampleRate: %d bytesPerFrame: %d channels: %d", GetCodecName(codec), sampleRate, bytesPerFrame, channels); } // This is used by sceMp3, in Beats. diff --git a/Core/HLE/sceKernel.cpp b/Core/HLE/sceKernel.cpp index ddae1e157b..85df5f83ef 100644 --- a/Core/HLE/sceKernel.cpp +++ b/Core/HLE/sceKernel.cpp @@ -1036,7 +1036,7 @@ void Register_ThreadManForKernel() const char *KernelErrorToString(u32 err) { switch (err) { case 0x00000000: return "ERROR_OK"; - case SCE_KERNEL_ERROR_BAD_ARGUMENT: "BAD_ARGUMENT"; + case SCE_KERNEL_ERROR_BAD_ARGUMENT: return "BAD_ARGUMENT"; case 0x80000020: return "ALREADY"; case 0x80000021: return "BUSY"; case 0x80000022: return "OUT_OF_MEMORY"; diff --git a/Core/Util/GameManager.h b/Core/Util/GameManager.h index 9d75a450e1..682ec1d6c1 100644 --- a/Core/Util/GameManager.h +++ b/Core/Util/GameManager.h @@ -90,7 +90,7 @@ public: // Extracts the contents of an open zip archive into dest. Exposed for testing. // maxTotalSize limits the total decompressed size (zip bomb protection). - bool ExtractZipContents(struct zip *z, const Path &dest, const ZipFileInfo &info, bool allowRoot, size_t maxTotalSize = 0x100000000); + bool ExtractZipContents(struct zip *z, const Path &dest, const ZipFileInfo &info, bool allowRoot, size_t maxTotalSize = 0x100000000ULL); private: void InstallZipContents(ZipFileTask task); @@ -100,7 +100,7 @@ private: void InstallDone(); - bool ExtractFile(struct zip *z, int file_index, const Path &outFilename, size_t *bytesCopied, size_t allBytes, size_t maxTotalSize = 0x100000000); + bool ExtractFile(struct zip *z, int file_index, const Path &outFilename, size_t *bytesCopied, size_t allBytes, size_t maxTotalSize = 0x100000000ULL); bool DetectTexturePackDest(struct zip *z, int iniIndex, Path &dest); void SetInstallError(std::string_view err); diff --git a/UI/InstallZipScreen.cpp b/UI/InstallZipScreen.cpp index 6e2139ee5a..cf7bbf22f9 100644 --- a/UI/InstallZipScreen.cpp +++ b/UI/InstallZipScreen.cpp @@ -143,7 +143,6 @@ void InstallZipScreen::CreateContentViews(UI::ViewGroup *parent) { std::string shortFilename = zipPath_.GetFilename(); - bool showDeleteCheckbox = false; returnToHomebrew_ = false; installChoice_ = nullptr; playChoice_ = nullptr; @@ -186,7 +185,6 @@ void InstallZipScreen::CreateContentViews(UI::ViewGroup *parent) { } returnToHomebrew_ = true; - showDeleteCheckbox = true; break; } case ZipFileContents::TEXTURE_PACK: @@ -195,7 +193,6 @@ void InstallZipScreen::CreateContentViews(UI::ViewGroup *parent) { leftColumn->Add(new TextView(question)); leftColumn->Add(new TextView(shortFilename)); - showDeleteCheckbox = true; break; } case ZipFileContents::PRX_PLUGIN: @@ -241,7 +238,6 @@ void InstallZipScreen::CreateContentViews(UI::ViewGroup *parent) { destFolders_.push_back(savestateDir); // TODO: Use the GameInfoCache to display data about the game if available. - showDeleteCheckbox = true; break; } case ZipFileContents::SAVE_DATA: @@ -282,7 +278,6 @@ void InstallZipScreen::CreateContentViews(UI::ViewGroup *parent) { } } - showDeleteCheckbox = true; break; } case ZipFileContents::FRAME_DUMP: diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 3ccdba5b7f..829eb88889 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -578,9 +578,7 @@ void NativeInit(int argc, const char *argv[], const CommandLineOptions &cmdLineO // Apply parsed command line options to config. cmdLineOptions.ApplyToConfig(); - bool gotBootFilename = false; boot_filename.clear(); - if (boot_filename.empty() && cmdLineOptions.bootVSH.has_value() && cmdLineOptions.bootVSH.value()) { boot_filename = g_Config.flash0Directory / "vsh/module/vshmain.prx"; } @@ -629,7 +627,6 @@ void NativeInit(int argc, const char *argv[], const CommandLineOptions &cmdLineO // don't already have one. if (!cmdLineOptions.bootFilenames.empty()) { std::string bootFilename = cmdLineOptions.bootFilenames[0]; - gotBootFilename = true; INFO_LOG(Log::System, "Boot filename found in args: '%s'", bootFilename.c_str()); bool okToLoad = true;