]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix some compiler warnings
authorslava <slava@linux-vm.(none)>
Fri, 1 May 2009 03:50:53 +0000 (23:50 -0400)
committerslava <slava@linux-vm.(none)>
Fri, 1 May 2009 03:50:53 +0000 (23:50 -0400)
build-support/factor.sh
vm/debug.c
vm/utilities.c

index 3ece72306ad15ebd6d26621e96d6c117e2284ed5..ba5815cfc180eb90e3cbbe23964924af7f8ae2c4 100755 (executable)
@@ -205,7 +205,7 @@ find_architecture() {
 
 write_test_program() {
     echo "#include <stdio.h>" > $C_WORD.c
-    echo "int main(){printf(\"%ld\", 8*sizeof(void*)); return 0; }" >> $C_WORD.c
+    echo "int main(){printf(\"%ld\", (long)(8*sizeof(void*))); return 0; }" >> $C_WORD.c
 }
 
 c_find_word_size() {
index 6f7e883785f092f4befba49cdf1271d10b01350c..a9afd2c3c0754042a8a3dcc62987bb8ebd2a1544 100755 (executable)
@@ -414,7 +414,7 @@ void factorbug(void)
                if(strcmp(cmd,"d") == 0)
                {
                        CELL addr = read_cell_hex();
-                       scanf(" ");
+                       if(scanf(" ") < 0) break;
                        CELL count = read_cell_hex();
                        dump_memory(addr,addr+count);
                }
index d97b540884b8a7e3bab9a38598d4d548151e14d5..ac52772b4e4ce56f4c0d0b129beb9c275372c161 100755 (executable)
@@ -50,6 +50,6 @@ void print_fixnum(F_FIXNUM x)
 CELL read_cell_hex(void)
 {
        CELL cell;
-       scanf(CELL_HEX_FORMAT,&cell);
+       if(scanf(CELL_HEX_FORMAT,&cell) < 0) exit(1);
        return cell;
 };