fix warnings
This commit is contained in:
@ -7,10 +7,13 @@
|
||||
|
||||
// Warnings
|
||||
#ifdef _WIN32
|
||||
#pragma warning(disable:4005)
|
||||
#pragma warning(disable:4018)
|
||||
#pragma warning(disable:4065)
|
||||
#pragma warning(disable:4127)
|
||||
#pragma warning(disable:4244)
|
||||
#pragma warning(disable:4267)
|
||||
#pragma warning(disable:4005)
|
||||
#pragma warning(disable:4065)
|
||||
#pragma warning(disable:4389)
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
|
@ -67,13 +67,13 @@ void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& dat
|
||||
}
|
||||
else
|
||||
{
|
||||
auto data = utils::string::parse_code(line);
|
||||
auto opdata = utils::string::parse_code(line);
|
||||
|
||||
if (switchnum)
|
||||
{
|
||||
if (data[0] == "case" || data[0] == "default")
|
||||
if (opdata[0] == "case" || opdata[0] == "default")
|
||||
{
|
||||
for (auto& entry : data)
|
||||
for (auto& entry : opdata)
|
||||
{
|
||||
func->instructions.back()->data.push_back(entry);
|
||||
}
|
||||
@ -87,10 +87,10 @@ void assembler::assemble(const std::string& file, std::vector<std::uint8_t>& dat
|
||||
{
|
||||
auto inst = std::make_unique<instruction>();
|
||||
inst->index = index;
|
||||
inst->opcode = static_cast<std::uint8_t>(resolver::opcode_id(data[0]));
|
||||
inst->opcode = static_cast<std::uint8_t>(resolver::opcode_id(opdata[0]));
|
||||
inst->size = opcode_size(inst->opcode);
|
||||
data.erase(data.begin());
|
||||
inst->data = std::move(data);
|
||||
opdata.erase(opdata.begin());
|
||||
inst->data = std::move(opdata);
|
||||
|
||||
switch (opcode(inst->opcode))
|
||||
{
|
||||
|
@ -858,12 +858,12 @@ void compiler::emit_stmt_switch(const ast::stmt_switch::ptr& stmt, const block::
|
||||
break_blks_ = old_breaks;
|
||||
}
|
||||
|
||||
void compiler::emit_stmt_case(const ast::stmt_case::ptr& stmt, const block::ptr& blk)
|
||||
void compiler::emit_stmt_case(const ast::stmt_case::ptr& stmt, const block::ptr&)
|
||||
{
|
||||
throw comp_error(stmt->loc(), "illegal case statement");
|
||||
}
|
||||
|
||||
void compiler::emit_stmt_default(const ast::stmt_default::ptr& stmt, const block::ptr& blk)
|
||||
void compiler::emit_stmt_default(const ast::stmt_default::ptr& stmt, const block::ptr&)
|
||||
{
|
||||
throw comp_error(stmt->loc(), "illegal default statement");
|
||||
}
|
||||
@ -904,17 +904,17 @@ void compiler::emit_stmt_return(const ast::stmt_return::ptr& stmt, const block::
|
||||
emit_opcode(opcode::OP_End);
|
||||
}
|
||||
|
||||
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr& stmt, const block::ptr& blk)
|
||||
void compiler::emit_stmt_breakpoint(const ast::stmt_breakpoint::ptr&, const block::ptr&)
|
||||
{
|
||||
// TODO:
|
||||
}
|
||||
|
||||
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr& stmt, const block::ptr& blk)
|
||||
void compiler::emit_stmt_prof_begin(const ast::stmt_prof_begin::ptr&, const block::ptr&)
|
||||
{
|
||||
// TODO:
|
||||
}
|
||||
|
||||
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr& stmt, const block::ptr& blk)
|
||||
void compiler::emit_stmt_prof_end(const ast::stmt_prof_end::ptr&, const block::ptr&)
|
||||
{
|
||||
// TODO:
|
||||
}
|
||||
@ -1547,7 +1547,7 @@ void compiler::emit_expr_arguments(const ast::expr_arguments::ptr& expr, const b
|
||||
}
|
||||
}
|
||||
|
||||
void compiler::emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr& blk)
|
||||
void compiler::emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr&)
|
||||
{
|
||||
bool method = false;
|
||||
auto type = resolve_reference_type(expr, method);
|
||||
@ -2542,7 +2542,7 @@ void compiler::process_stmt_switch(const ast::stmt_switch::ptr& stmt, const bloc
|
||||
break_blks_ = old_breaks;
|
||||
}
|
||||
|
||||
void compiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block::ptr& blk)
|
||||
void compiler::process_stmt_break(const ast::stmt_break::ptr&, const block::ptr& blk)
|
||||
{
|
||||
if (blk->abort == abort_t::abort_none)
|
||||
{
|
||||
@ -2551,7 +2551,7 @@ void compiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block:
|
||||
}
|
||||
}
|
||||
|
||||
void compiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk)
|
||||
void compiler::process_stmt_continue(const ast::stmt_continue::ptr&, const block::ptr& blk)
|
||||
{
|
||||
if (blk->abort == abort_t::abort_none)
|
||||
{
|
||||
@ -2560,7 +2560,7 @@ void compiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const
|
||||
}
|
||||
}
|
||||
|
||||
void compiler::process_stmt_return(const ast::stmt_return::ptr& stmt, const block::ptr& blk)
|
||||
void compiler::process_stmt_return(const ast::stmt_return::ptr&, const block::ptr& blk)
|
||||
{
|
||||
if (blk->abort == abort_t::abort_none)
|
||||
{
|
||||
@ -2873,7 +2873,7 @@ void compiler::insert_label(const std::string& name)
|
||||
}
|
||||
}
|
||||
|
||||
auto compiler::map_known_includes(const std::string& include) -> bool
|
||||
auto compiler::map_known_includes(const std::string&) -> bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -2954,7 +2954,7 @@ void decompiler::process_stmt_cases(const ast::stmt_list::ptr& stmt, const block
|
||||
}
|
||||
}
|
||||
|
||||
void decompiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const block::ptr& blk)
|
||||
void decompiler::process_stmt_break(const ast::stmt_break::ptr&, const block::ptr& blk)
|
||||
{
|
||||
if (blk->abort == abort_t::abort_none)
|
||||
{
|
||||
@ -2962,7 +2962,7 @@ void decompiler::process_stmt_break(const ast::stmt_break::ptr& stmt, const bloc
|
||||
}
|
||||
}
|
||||
|
||||
void decompiler::process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk)
|
||||
void decompiler::process_stmt_continue(const ast::stmt_continue::ptr&, const block::ptr& blk)
|
||||
{
|
||||
if (blk->abort == abort_t::abort_none)
|
||||
{
|
||||
@ -3279,7 +3279,7 @@ void decompiler::process_field_variable(const ast::expr_field::ptr& expr, const
|
||||
process_expr(expr->obj, blk);
|
||||
}
|
||||
|
||||
void decompiler::process_local_variable(const ast::expr_identifier::ptr& expr, const block::ptr& blk)
|
||||
void decompiler::process_local_variable(const ast::expr_identifier::ptr&, const block::ptr&)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user