From 7488e54825620e237ebaaaad5fd18671ae3d3071 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 8 Mar 2016 10:01:50 -0800 Subject: [PATCH] math.cpp: Fix two warnings. Fixes #1549. --- vm/math.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/math.cpp b/vm/math.cpp index 37d3d0df7e..0e57c510a3 100644 --- a/vm/math.cpp +++ b/vm/math.cpp @@ -223,7 +223,7 @@ void factor_vm::primitive_format_float() { std::ostringstream localized_stream; try { localized_stream.imbue(std::locale(locale)); - } catch (const runtime_error& error) { + } catch (const runtime_error&) { byte_array* array = allot_byte_array(1); array->data()[0] = '\0'; ctx->replace(tag(array)); @@ -248,7 +248,7 @@ void factor_vm::primitive_format_float() { localized_stream << value; const std::string& tmp = localized_stream.str(); const char* cstr = tmp.c_str(); - int size = tmp.length()+1; + size_t size = tmp.length()+1; byte_array* array = allot_byte_array(size); memcpy(array->data(), cstr, size); ctx->replace(tag(array));