remove warnings introduced in 244552393b

issue#70
Houtan Bastani 2018-07-09 11:53:29 +02:00
parent 853cce553f
commit a7f8eaa336
2 changed files with 3 additions and 3 deletions

View File

@ -107,7 +107,7 @@ MacroDriver::replace_vars_in_str(const string &s) const
regex_search(macro, name, name_regex);
try
{
const MacroValue *mv;
const MacroValue *mv = nullptr;
bool found_in_func_env = false;
for (unsigned i = func_env.size(); i-- > 0;)
{
@ -162,7 +162,7 @@ MacroDriver::eval_string_function(const string &name, const MacroValue *args)
throw MacroValue::TypeError("You are using " + name + " as if it were a macro function");
vector<string *> func_args = fmv->get_args();
if (func_args.size() != dynamic_cast<const IntMV *>(args->length())->get_int_value())
if (func_args.size() != (size_t)dynamic_cast<const IntMV *>(args->length())->get_int_value())
{
cerr << "Macroprocessor: The evaluation of: " << name << " could not be completed" << endl
<< "because the number of arguments provided is different than the number of" << endl

View File

@ -523,7 +523,7 @@ FuncMV::operator==(const MacroValue &mv) const noexcept(false)
return new IntMV(driver, 0);
if (args.size() == mv2->args.size())
for (int i = 0; i < args.size(); i++)
for (size_t i = 0; i < args.size(); i++)
if (args[i] != mv2->args[i])
return new IntMV(driver, 0);