]> gitweb.factorcode.org Git - factor.git/commitdiff
math.cpp: Fix two warnings. Fixes #1549.
authorDoug Coleman <doug.coleman@gmail.com>
Tue, 8 Mar 2016 18:01:50 +0000 (10:01 -0800)
committerDoug Coleman <doug.coleman@gmail.com>
Tue, 8 Mar 2016 18:02:28 +0000 (10:02 -0800)
vm/math.cpp

index 37d3d0df7ed089fa5b0624b16d9bf7a6a2567fdb..0e57c510a3a02e39777d53b0a0e0e4ac4b7f57d5 100644 (file)
@@ -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<char>()[0] = '\0';
     ctx->replace(tag<byte_array>(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<char>(), cstr, size);
   ctx->replace(tag<byte_array>(array));