]> gitweb.factorcode.org Git - factor.git/blobdiff - vm/contexts.cpp
vm: fix compile warnings on Windows and add /WX to Nmakefile to report warnings as...
[factor.git] / vm / contexts.cpp
index 8ec3363662652c3c194d4d3b9f4be7668f97d6e8..8359e09307057aac03a7f3ed02de9a98219568f4 100644 (file)
@@ -62,14 +62,14 @@ void context::scrub_stacks(gc_info *info, cell index)
        {
                cell base = info->scrub_d_base(index);
 
-               for(cell loc = 0; loc < info->scrub_d_count; loc++)
+               for(int loc = 0; loc < info->scrub_d_count; loc++)
                {
                        if(bitmap_p(bitmap,base + loc))
                        {
 #ifdef DEBUG_GC_MAPS
                                std::cout << "scrubbing datastack location " << loc << std::endl;
 #endif
-                               ((cell *)datastack)[-loc] = 0;
+                               *((cell *)datastack - loc) = 0;
                        }
                }
        }
@@ -77,14 +77,14 @@ void context::scrub_stacks(gc_info *info, cell index)
        {
                cell base = info->scrub_r_base(index);
 
-               for(cell loc = 0; loc < info->scrub_r_count; loc++)
+               for(int loc = 0; loc < info->scrub_r_count; loc++)
                {
                        if(bitmap_p(bitmap,base + loc))
                        {
 #ifdef DEBUG_GC_MAPS
                                std::cout << "scrubbing retainstack location " << loc << std::endl;
 #endif
-                               ((cell *)retainstack)[-loc] = 0;
+                               *((cell *)retainstack - loc) = 0;
                        }
                }
        }