RPA Toolkit
Fixed a build warnings/errors for windows
authorMartin Stoilov <martin@rpasearch.com>
Tue, 26 Jul 2011 06:55:15 +0000 (23:55 -0700)
committerMartin Stoilov <martin@rpasearch.com>
Tue, 26 Jul 2011 06:55:15 +0000 (23:55 -0700)
arch/windows/x64/rtypes.h
rpa/rpadbex.c
rpa/rpaparser.c
rpa/rparecord.c
rvm/rvmreg.h

index 3170b9e..c17e470 100644 (file)
@@ -52,7 +52,7 @@ typedef struct {ruint32 p1; ruint32 p2;} rpair_t;
                do { InterlockedExchangeAdd (ptr, -val); } while (0)
 
 
-#define R_DEBUG_BRAKE do { } while (0)
+#define R_DEBUG_BRAKE do { __debugbreak(); } while (0)
 #define R_ASSERT(__a__) do {if (!(__a__)) R_DEBUG_BRAKE; } while (0)
 #define R_SIZE_ALIGN(s, n) ((((s) + (n) - 1) / (n)) * (n))
 #define R_MIN(a, b) ((a) < (b) ? (a): (b))
index b3b03b2..0bd28d7 100644 (file)
@@ -1236,6 +1236,7 @@ static long rpa_dbex_copy_handler(rarray_t *records, long rec, rpointer userdata
                        break;
                default:
                        usertype = RPA_MATCH_NONE;
+                       break;
                };
                lastrec = r_array_length(dbex->records) - 1;
                if (lastrec >= 0)
index cc9c254..a1f5edd 100644 (file)
@@ -167,6 +167,8 @@ static void rpa_production_bnf(rpa_parser_t *pa)
        rvm_codegen_index_addrelocins(co->cg, RVM_RELOC_BRANCH, RPA_COMPILER_CURRENTEXP(co)->endidx, rvm_asm(RVM_BGRE, DA, XX, XX, 0));
        rvm_codegen_addins(co->cg, rvm_asm(RPA_MATCHCHR_NAN, DA, XX, XX, ';'));
        rvm_codegen_index_addrelocins(co->cg, RVM_RELOC_BRANCH, RPA_COMPILER_CURRENTEXP(co)->endidx, rvm_asm(RVM_BGRE, DA, XX, XX, 0));
+       rvm_codegen_addins(co->cg, rvm_asm(RPA_MATCHCHR_NAN, DA, XX, XX, '\0'));
+       rvm_codegen_index_addrelocins(co->cg, RVM_RELOC_BRANCH, RPA_COMPILER_CURRENTEXP(co)->endidx, rvm_asm(RVM_BGRE, DA, XX, XX, 0));
        rpa_compiler_class_end(co);
        rvm_codegen_index_addrelocins(co->cg, RVM_RELOC_BRANCH, RPA_COMPILER_CURRENTEXP(co)->endidx, rvm_asm(RVM_BLES, DA, XX, XX, 0));
        rpa_compiler_branch_end(co);
@@ -564,6 +566,8 @@ static void rpa_production_regexchar(rpa_parser_t *pa)
        rpa_compiler_t *co = pa->co;
        rpa_compiler_rule_begin_s(co, "regexchar", 0);
 
+       rvm_codegen_addins(co->cg, rvm_asm(RPA_MATCHCHR_NAN, DA, XX, XX, '\0'));
+       rvm_codegen_index_addrelocins(co->cg, RVM_RELOC_BRANCH, RPA_COMPILER_CURRENTEXP(co)->endidx, rvm_asm(RVM_BGRE, DA, XX, XX, 0));
        rvm_codegen_addins(co->cg, rvm_asm(RPA_MATCHCHR_NAN, DA, XX, XX, ' '));
        rvm_codegen_index_addrelocins(co->cg, RVM_RELOC_BRANCH, RPA_COMPILER_CURRENTEXP(co)->endidx, rvm_asm(RVM_BGRE, DA, XX, XX, 0));
        rvm_codegen_addins(co->cg, rvm_asm(RPA_MATCHCHR_NAN, DA, XX, XX, '~'));
index c222254..2abd82c 100644 (file)
@@ -234,6 +234,7 @@ static void rpa_recordptr_setusertype(rparecord_t *prec, ruint32 usertype, rvals
                break;
        default:
                prec->usertype = usertype;
+               break;
        }
 }
 
index 0f8a4a9..fe29e8c 100644 (file)
@@ -144,7 +144,7 @@ typedef struct rvmreg_s {
        union {
                ruint64 u64;
                rword w;
-               long l;
+               rsword l;
                rpointer p;
                double d;
                char *s;