]> gitweb.factorcode.org Git - factor.git/commitdiff
vm: quell warnings from vars only used by asserts
authorJoe Groff <arcata@gmail.com>
Wed, 23 Nov 2011 06:51:54 +0000 (22:51 -0800)
committerJoe Groff <arcata@gmail.com>
Wed, 23 Nov 2011 19:11:28 +0000 (11:11 -0800)
vm/cpu-x86.hpp
vm/jit.cpp

index e30aeab6e6e913d41af3c1d955b014185543a649..8cda442889cf7932dbd304ba2bcf24ffa631749e 100755 (executable)
@@ -29,6 +29,7 @@ inline static void check_call_site(cell return_address)
 {
        unsigned char opcode = call_site_opcode(return_address);
        FACTOR_ASSERT(opcode == call_opcode || opcode == jmp_opcode);
+       (void)opcode; // suppress warning when compiling without assertions
 }
 
 inline static void *get_call_target(cell return_address)
index 775e0487fcbaf2fc41059afa7305584cbf343faf..36c1d94a465241c23ac21d78bb29fa79c22252b0 100644 (file)
@@ -23,12 +23,14 @@ jit::jit(code_block_type type_, cell owner_, factor_vm *vm)
 {
        fixnum old_count = atomic::fetch_add(&parent->current_jit_count, 1);
        FACTOR_ASSERT(old_count >= 0);
+       (void)old_count;
 }
 
 jit::~jit()
 {
        fixnum old_count = atomic::fetch_subtract(&parent->current_jit_count, 1);
        FACTOR_ASSERT(old_count >= 1);
+       (void)old_count;
 }
 
 void jit::emit_relocation(cell relocation_template_)