From 6dc158cd0950335eda51bae77ff635c09742e7d1 Mon Sep 17 00:00:00 2001 From: chaoticgd <43898262+chaoticgd@users.noreply.github.com> Date: Wed, 28 Aug 2024 00:25:55 +0100 Subject: [PATCH] DebugTools: Fix some compiler warnings --- pcsx2-qt/Debugger/Models/BreakpointModel.cpp | 2 -- pcsx2/DebugTools/DebugInterface.cpp | 2 +- pcsx2/DebugTools/SymbolGuardian.cpp | 17 ++--------------- pcsx2/DebugTools/SymbolGuardian.h | 4 ---- 4 files changed, 3 insertions(+), 22 deletions(-) diff --git a/pcsx2-qt/Debugger/Models/BreakpointModel.cpp b/pcsx2-qt/Debugger/Models/BreakpointModel.cpp index a3e76438cf13c3..07bb9bb898a89a 100644 --- a/pcsx2-qt/Debugger/Models/BreakpointModel.cpp +++ b/pcsx2-qt/Debugger/Models/BreakpointModel.cpp @@ -254,8 +254,6 @@ QVariant BreakpointModel::headerData(int section, Qt::Orientation orientation, i Qt::ItemFlags BreakpointModel::flags(const QModelIndex& index) const { - volatile const int row = index.row(); - switch (index.column()) { case BreakpointColumns::CONDITION: diff --git a/pcsx2/DebugTools/DebugInterface.cpp b/pcsx2/DebugTools/DebugInterface.cpp index 90768d476fe72e..00cb8bf6ba8b8a 100644 --- a/pcsx2/DebugTools/DebugInterface.cpp +++ b/pcsx2/DebugTools/DebugInterface.cpp @@ -299,7 +299,7 @@ std::optional DebugInterface::getStackFrameSize(const ccc::Function& functi u32 instruction = read32(function.address().value); if ((instruction & 0xffff0000) == 0x27bd0000) - stack_frame_size = -(instruction & 0xffff); + stack_frame_size = -(s16)(instruction & 0xffff); if (stack_frame_size < 0) return std::nullopt; diff --git a/pcsx2/DebugTools/SymbolGuardian.cpp b/pcsx2/DebugTools/SymbolGuardian.cpp index 7b8624d66bab57..d959965f4bc6ea 100644 --- a/pcsx2/DebugTools/SymbolGuardian.cpp +++ b/pcsx2/DebugTools/SymbolGuardian.cpp @@ -3,7 +3,6 @@ #include "SymbolGuardian.h" -#include #include #include #include @@ -19,6 +18,8 @@ #include "Host.h" #include "VMManager.h" +#include + SymbolGuardian R5900SymbolGuardian; SymbolGuardian R3000SymbolGuardian; @@ -124,20 +125,6 @@ void SymbolGuardian::Reset() }); } -static void CreateBuiltInDataType( - ccc::SymbolDatabase& database, ccc::SymbolSourceHandle source, const char* name, ccc::ast::BuiltInClass bclass) -{ - ccc::Result symbol = database.data_types.create_symbol(name, source, nullptr); - if (!symbol.success()) - return; - - std::unique_ptr type = std::make_unique(); - type->name = name; - type->size_bytes = ccc::ast::builtin_class_size(bclass); - type->bclass = bclass; - (*symbol)->set_type(std::move(type)); -} - void SymbolGuardian::ImportElf(std::vector elf, std::string elf_file_name, const std::string& nocash_path) { ccc::Result parsed_elf = ccc::ElfFile::parse(std::move(elf)); diff --git a/pcsx2/DebugTools/SymbolGuardian.h b/pcsx2/DebugTools/SymbolGuardian.h index e1d165b7cb06ab..7959a0707ee45a 100644 --- a/pcsx2/DebugTools/SymbolGuardian.h +++ b/pcsx2/DebugTools/SymbolGuardian.h @@ -3,7 +3,6 @@ #pragma once -#include #include #include #include @@ -103,9 +102,6 @@ struct SymbolGuardian std::thread m_import_thread; std::atomic_bool m_interrupt_import_thread = false; - - std::queue m_load_queue; - std::mutex m_load_queue_lock; }; extern SymbolGuardian R5900SymbolGuardian;