1
0
Fork 0
forked from suyu/suyu

Fix some warnings (#2399)

This commit is contained in:
Jonathan Hao 2017-01-05 00:48:29 +08:00 committed by Yuri Kunde Schlesner
parent 159bcbfdbc
commit c18cb1b192
13 changed files with 9 additions and 35 deletions

View file

@ -99,7 +99,7 @@ private:
};
GRenderWindow::GRenderWindow(QWidget* parent, EmuThread* emu_thread)
: QWidget(parent), keyboard_id(0), emu_thread(emu_thread), child(nullptr) {
: QWidget(parent), child(nullptr), keyboard_id(0), emu_thread(emu_thread) {
std::string window_title =
Common::StringFromFormat("Citra | %s-%s", Common::g_scm_branch, Common::g_scm_desc);

View file

@ -45,7 +45,6 @@ void CallstackWidget::OnDebugModeEntered() {
if (ARM_Disasm::Decode(insn) == OP_BL) {
std::string name;
// ripped from disasm
u8 cond = (insn >> 28) & 0xf;
u32 i_offset = insn & 0xffffff;
// Sign-extend the 24-bit offset
if ((i_offset >> 23) & 1)

View file

@ -135,11 +135,6 @@ void GPUCommandListWidget::OnCommandDoubleClicked(const QModelIndex& index) {
UNREACHABLE_MSG("Unknown texture command");
}
const auto texture = Pica::g_state.regs.GetTextures()[texture_index];
const auto config = texture.config;
const auto format = texture.format;
const auto info = Pica::DebugUtils::TextureInfo::FromPicaRegister(config, format);
// TODO: Open a surface debugger
}
}

View file

@ -276,9 +276,6 @@ QVariant GraphicsVertexShaderModel::data(const QModelIndex& index, int role) con
output << 'b' << instr.flow_control.bool_uniform_id << ' ';
}
u32 target_addr = instr.flow_control.dest_offset;
u32 target_addr_else = instr.flow_control.dest_offset;
if (opcode_info.subtype & OpCode::Info::HasAlternative) {
output << "else jump to 0x" << std::setw(4) << std::right
<< std::setfill('0') << std::hex
@ -473,7 +470,6 @@ GraphicsVertexShaderWidget::GraphicsVertexShaderWidget(
}
void GraphicsVertexShaderWidget::OnBreakPointHit(Pica::DebugContext::Event event, void* data) {
auto input = static_cast<Pica::Shader::InputVertex*>(data);
if (event == Pica::DebugContext::Event::VertexShaderInvocation) {
Reload(true, data);
} else {

View file

@ -165,13 +165,6 @@ void CSpinBox::UpdateText() {
// Uppercase digits greater than 9.
mask += ">";
// The greatest signed 64-bit number has 19 decimal digits.
// TODO: Could probably make this more generic with some logarithms.
// For reference, unsigned 64-bit can have up to 20 decimal digits.
int digits = (num_digits != 0)
? num_digits
: (base == 16) ? 16 : (base == 10) ? 19 : 0xFF; // fallback case...
// Match num_digits digits
// Digits irrelevant to the chosen number base are filtered in the validator
mask += QString("H").repeated(std::max(num_digits, 1));

View file

@ -57,7 +57,6 @@ const u32 SIGTERM = 15;
const u32 MSG_WAITALL = 8;
#endif
const u32 R0_REGISTER = 0;
const u32 R15_REGISTER = 15;
const u32 CPSR_REGISTER = 25;
const u32 FPSCR_REGISTER = 58;
@ -816,10 +815,6 @@ static void RemoveBreakpoint() {
auto addr_pos = std::find(start_offset, command_buffer + command_length, ',');
PAddr addr = HexToInt(start_offset, static_cast<u32>(addr_pos - start_offset));
start_offset = addr_pos + 1;
u32 len =
HexToInt(start_offset, static_cast<u32>((command_buffer + command_length) - start_offset));
if (type == BreakpointType::Access) {
// Access is made up of Read and Write types, so add both breakpoints
type = BreakpointType::Read;

View file

@ -2,6 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include <cinttypes>
#include "core/hle/service/boss/boss.h"
#include "core/hle/service/boss/boss_p.h"
#include "core/hle/service/boss/boss_u.h"
@ -33,7 +34,8 @@ void InitializeSession(Service::Interface* self) {
cmd_buff[0] = IPC::MakeHeader(0x1, 0x1, 0);
cmd_buff[1] = RESULT_SUCCESS.raw;
LOG_WARNING(Service_BOSS, "(STUBBED) unk_param=0x%016X, translation=0x%08X, unk_param4=0x%08X",
LOG_WARNING(Service_BOSS,
"(STUBBED) unk_param=0x%016" PRIX64 ", translation=0x%08X, unk_param4=0x%08X",
unk_param, translation, unk_param4);
}

View file

@ -84,7 +84,6 @@ struct ConsoleCountryInfo {
static_assert(sizeof(ConsoleCountryInfo) == 4, "ConsoleCountryInfo must be exactly 4 bytes");
}
static const u64 CFG_SAVE_ID = 0x00010017;
static const u64 CONSOLE_UNIQUE_ID = 0xDEADC0DE;
static const ConsoleModelInfo CONSOLE_MODEL = {NINTENDO_3DS_XL, {0, 0, 0}};
static const u8 CONSOLE_LANGUAGE = LANGUAGE_EN;

View file

@ -99,7 +99,8 @@ static void StartSampling(Interface* self) {
is_sampling = true;
LOG_WARNING(Service_MIC, "(STUBBED) called, encoding=%u, sample_rate=%u, "
"audio_buffer_offset=%d, audio_buffer_size=%u, audio_buffer_loop=%u",
encoding, sample_rate, audio_buffer_offset, audio_buffer_size, audio_buffer_loop);
static_cast<u32>(encoding), static_cast<u32>(sample_rate), audio_buffer_offset,
audio_buffer_size, audio_buffer_loop);
}
/**
@ -114,7 +115,7 @@ static void AdjustSampling(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
sample_rate = static_cast<SampleRate>(cmd_buff[1] & 0xFF);
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
LOG_WARNING(Service_MIC, "(STUBBED) called, sample_rate=%u", sample_rate);
LOG_WARNING(Service_MIC, "(STUBBED) called, sample_rate=%u", static_cast<u32>(sample_rate));
}
/**

View file

@ -603,7 +603,6 @@ static void RecvFrom(Interface* self) {
u32 socket_handle = cmd_buffer[1];
u32 len = cmd_buffer[2];
u32 flags = cmd_buffer[3];
socklen_t addr_len = static_cast<socklen_t>(cmd_buffer[4]);
struct {
u32 output_buffer_descriptor;
@ -693,7 +692,6 @@ static void Poll(Interface* self) {
static void GetSockName(Interface* self) {
u32* cmd_buffer = Kernel::GetCommandBuffer();
u32 socket_handle = cmd_buffer[1];
socklen_t ctr_len = cmd_buffer[2];
// Memory address of the ctr_dest_addr structure
VAddr ctr_dest_addr_addr = cmd_buffer[0x104 >> 2];
@ -734,7 +732,6 @@ static void Shutdown(Interface* self) {
static void GetPeerName(Interface* self) {
u32* cmd_buffer = Kernel::GetCommandBuffer();
u32 socket_handle = cmd_buffer[1];
socklen_t len = cmd_buffer[2];
// Memory address of the ctr_dest_addr structure
VAddr ctr_dest_addr_addr = cmd_buffer[0x104 >> 2];
@ -765,7 +762,6 @@ static void Connect(Interface* self) {
// performing nonblocking operations and spinlock until the data is available
u32* cmd_buffer = Kernel::GetCommandBuffer();
u32 socket_handle = cmd_buffer[1];
socklen_t len = cmd_buffer[2];
// Memory address of the ctr_input_addr structure
VAddr ctr_input_addr_addr = cmd_buffer[6];

View file

@ -288,7 +288,7 @@ ResultStatus AppLoader_NCCH::LoadExeFS() {
LOG_DEBUG(Loader, "Thread priority: 0x%X", priority);
LOG_DEBUG(Loader, "Resource limit category: %d", resource_limit_category);
LOG_DEBUG(Loader, "System Mode: %d",
exheader_header.arm11_system_local_caps.system_mode);
static_cast<int>(exheader_header.arm11_system_local_caps.system_mode));
if (exheader_header.arm11_system_local_caps.program_id != ncch_header.program_id) {
LOG_ERROR(Loader, "ExHeader Program ID mismatch: the ROM is probably encrypted.");

View file

@ -181,7 +181,7 @@ public:
* Loads the Exheader and returns the system mode for this application.
* @return Optional with the kernel system mode
*/
boost::optional<u32> LoadKernelSystemMode();
boost::optional<u32> LoadKernelSystemMode() override;
ResultStatus ReadCode(std::vector<u8>& buffer) override;

View file

@ -27,8 +27,6 @@ namespace Pica {
namespace Shader {
constexpr u32 INVALID_ADDRESS = 0xFFFFFFFF;
struct CallStackElement {
u32 final_address; // Address upon which we jump to return_address
u32 return_address; // Where to jump when leaving scope