From: Doug Coleman Date: Wed, 2 Dec 2020 22:38:25 +0000 (-0600) Subject: vm: Cast cell to int for some C++ functions. X-Git-Tag: 0.99~2857 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=21875a3c87244fb04a76b2c623d6a02cf69d947b vm: Cast cell to int for some C++ functions. --- diff --git a/vm/debug.cpp b/vm/debug.cpp index da02aa5fad..4ffa5ac388 100644 --- a/vm/debug.cpp +++ b/vm/debug.cpp @@ -267,7 +267,7 @@ void factor_vm::dump_memory(ostream& out, cell from, cell to) { void dump_memory_range(ostream& out, const char* name, cell name_w, cell start, cell end) { - out << setw(name_w) << left << name << ": "; + out << setw(static_cast(name_w)) << left << name << ": "; out << "[" << (void*)start << " -> " << (void*)end << "] "; out << setw(10) << right << (end - start) << " bytes" << endl; diff --git a/vm/math.cpp b/vm/math.cpp index d78bf93c2f..ef56d265dc 100644 --- a/vm/math.cpp +++ b/vm/math.cpp @@ -238,10 +238,10 @@ void factor_vm::primitive_format_float() { localized_stream << std::setfill(fill[0]); } if (width >= 0) { - localized_stream << std::setw(width); + localized_stream << std::setw(static_cast(width)); } if (precision >= 0) { - localized_stream << std::setprecision(precision); + localized_stream << std::setprecision(static_cast(precision)); } localized_stream << value; const std::string& tmp = localized_stream.str();