]> gitweb.factorcode.org Git - factor.git/commitdiff
silence more msvc warnings
authorJoe Groff <arcata@gmail.com>
Thu, 6 May 2010 05:32:45 +0000 (22:32 -0700)
committerJoe Groff <arcata@gmail.com>
Thu, 6 May 2010 05:32:45 +0000 (22:32 -0700)
vm/gc.cpp
vm/io.cpp

index ed36aff563d727c33e84669d1dc98f79722d5f09..599ed3cd31ef7bbedd2369930ce3927218793d51 100755 (executable)
--- a/vm/gc.cpp
+++ b/vm/gc.cpp
@@ -180,7 +180,7 @@ void factor_vm::gc(gc_op op, cell requested_bytes, bool trace_contexts_p)
 
                        break;
                }
-               catch(const must_start_gc_again e)
+               catch(const must_start_gc_again &)
                {
                        /* We come back here if a generation is full */
                        start_gc_again();
index 94e6e64d1da760e8ca3f7d1b8b234c4f80dad98d..ba1e429802d8ac0d93d1ffd2b8ff17c4a08bb620 100755 (executable)
--- a/vm/io.cpp
+++ b/vm/io.cpp
@@ -208,7 +208,7 @@ void factor_vm::primitive_fread()
 
        data_root<byte_array> buf(allot_uninitialized_array<byte_array>(size),this);
 
-       int c = safe_fread(buf.untagged() + 1,1,size,file);
+       size_t c = safe_fread(buf.untagged() + 1,1,size,file);
        if(c == 0)
                ctx->push(false_object);
        else
@@ -228,7 +228,7 @@ void factor_vm::primitive_fputc()
 {
        FILE *file = pop_file_handle();
        fixnum ch = to_fixnum(ctx->pop());
-       safe_fputc(ch, file);
+       safe_fputc((int)ch, file);
 }
 
 void factor_vm::primitive_fwrite()
@@ -254,8 +254,8 @@ void factor_vm::primitive_ftell()
 void factor_vm::primitive_fseek()
 {
        FILE *file = pop_file_handle();
-       int whence = to_fixnum(ctx->pop());
-       off_t offset = to_signed_8(ctx->pop());
+       int whence = (int)to_fixnum(ctx->pop());
+       off_t offset = (off_t)to_signed_8(ctx->pop());
        safe_fseek(file,offset,whence);
 }