Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DebugTools: Fix some compiler warnings #11756

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions pcsx2-qt/Debugger/Models/BreakpointModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions pcsx2/DebugTools/DebugInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,13 @@ std::optional<u32> DebugInterface::getStackFrameSize(const ccc::Function& functi
u32 instruction = read32(function.address().value);

if ((instruction & 0xffff0000) == 0x27bd0000)
stack_frame_size = -(instruction & 0xffff);
stack_frame_size = -static_cast<s16>(instruction & 0xffff);

if (stack_frame_size < 0)
return std::nullopt;
}

return (u32)stack_frame_size;
return static_cast<u32>(stack_frame_size);
}

bool DebugInterface::initExpression(const char* exp, PostfixExpression& dest)
Expand Down
17 changes: 2 additions & 15 deletions pcsx2/DebugTools/SymbolGuardian.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include "SymbolGuardian.h"

#include <demangle.h>
#include <ccc/ast.h>
#include <ccc/elf.h>
#include <ccc/importer_flags.h>
Expand All @@ -19,6 +18,8 @@
#include "Host.h"
#include "VMManager.h"

#include <demangle.h>

SymbolGuardian R5900SymbolGuardian;
SymbolGuardian R3000SymbolGuardian;

Expand Down Expand Up @@ -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<ccc::DataType*> symbol = database.data_types.create_symbol(name, source, nullptr);
if (!symbol.success())
return;

std::unique_ptr<ccc::ast::BuiltIn> type = std::make_unique<ccc::ast::BuiltIn>();
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<u8> elf, std::string elf_file_name, const std::string& nocash_path)
{
ccc::Result<ccc::ElfFile> parsed_elf = ccc::ElfFile::parse(std::move(elf));
Expand Down
4 changes: 0 additions & 4 deletions pcsx2/DebugTools/SymbolGuardian.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#pragma once

#include <queue>
#include <atomic>
#include <thread>
#include <functional>
Expand Down Expand Up @@ -103,9 +102,6 @@ struct SymbolGuardian

std::thread m_import_thread;
std::atomic_bool m_interrupt_import_thread = false;

std::queue<ccc::SymbolDatabase> m_load_queue;
std::mutex m_load_queue_lock;
};

extern SymbolGuardian R5900SymbolGuardian;
Expand Down