From c25aedac4b63e6e1a67900f36d1d82a5e502312d Mon Sep 17 00:00:00 2001 From: Maxim Poliakovski Date: Thu, 6 Feb 2020 15:17:40 +0100 Subject: [PATCH] Fix some MSVC errors and warnings. "This commit fixes as much as required to compile the project in a cross-platform fashion. Some MSV-specific warnings are simply ignored for now." -max --- cpu/ppc/ppcdisasm.cpp | 3 +++ debugger/debugger.cpp | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpu/ppc/ppcdisasm.cpp b/cpu/ppc/ppcdisasm.cpp index 1c19d01..e6b0149 100644 --- a/cpu/ppc/ppcdisasm.cpp +++ b/cpu/ppc/ppcdisasm.cpp @@ -2,8 +2,11 @@ @author maximumspatium */ +#define _CRT_SECURE_NO_WARNINGS /* shut up MSVC regarding the unsafe strcpy/strcat */ + #include #include +#include /* without this, MSVC doesn't understand std::function */ #include "ppcdisasm.h" using namespace std; diff --git a/debugger/debugger.cpp b/debugger/debugger.cpp index 5b2376b..007b2dd 100644 --- a/debugger/debugger.cpp +++ b/debugger/debugger.cpp @@ -61,7 +61,7 @@ void disasm(uint32_t inst_num = 1UL, uint32_t address = ppc_state.ppc_pc) void enter_debugger() { - string inp, cmd, addr_str, expr_str, reg_expr, last_cmd, inst_num_str; + string inp, cmd, addr_str, expr_str, reg_expr, last_cmd, reg_value_str, inst_string, inst_num_str; uint32_t addr, inst_grab; std::stringstream ss; @@ -90,9 +90,6 @@ void enter_debugger() else if (cmd == "quit") { break; } - else if (cmd == "memdump") { - dump_mem_file(); - } #ifdef PROFILER else if (cmd == "profiler") { cout << "Number of Supervisor Instructions Executed:" << supervisor_inst_num << endl;