jscript: Avoid signed-unsigned integer comparisons

Andrew Talbot andrew.talbot at talbotville.com
Sat Feb 9 16:32:02 CST 2013


Changelog:
    jscript: Avoid signed-unsigned integer comparisons.

diff --git a/dlls/jscript/date.c b/dlls/jscript/date.c
index f192824..d9243b1 100644
--- a/dlls/jscript/date.c
+++ b/dlls/jscript/date.c
@@ -2236,7 +2236,7 @@ static inline HRESULT date_parse(jsstr_t *input_str, double *ret) {
             }
             else {
                 /* Month or garbage */
-                int j;
+                unsigned int j;
 
                 for(size=i; parse[size]>='A' && parse[size]<='Z'; size++);
                 size -= i;
diff --git a/dlls/jscript/error.c b/dlls/jscript/error.c
index f7b0443..9f5cfe6 100644
--- a/dlls/jscript/error.c
+++ b/dlls/jscript/error.c
@@ -342,7 +342,7 @@ HRESULT init_error_constr(script_ctx_t *ctx, jsdisp_t *object_prototype)
         SyntaxErrorConstr_value, TypeErrorConstr_value, URIErrorConstr_value};
 
     jsdisp_t *err;
-    INT i;
+    unsigned int i;
     jsstr_t *str;
     HRESULT hres;
 
diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c
index b058460..552a505 100644
--- a/dlls/jscript/function.c
+++ b/dlls/jscript/function.c
@@ -755,7 +755,8 @@ static HRESULT construct_function(script_ctx_t *ctx, unsigned argc, jsval_t *arg
     bytecode_t *code;
     jsdisp_t *function;
     jsstr_t **params = NULL;
-    int i=0, j=0;
+    unsigned int i = 0;
+    int j = 0;
     HRESULT hres = S_OK;
 
     static const WCHAR function_anonymousW[] = {'f','u','n','c','t','i','o','n',' ','a','n','o','n','y','m','o','u','s','('};
diff --git a/dlls/jscript/regexp.c b/dlls/jscript/regexp.c
index c1311d1..263bee9 100644
--- a/dlls/jscript/regexp.c
+++ b/dlls/jscript/regexp.c
@@ -3596,7 +3596,7 @@ static HRESULT create_match_array(script_ctx_t *ctx, jsstr_t *input, const match
 {
     jsdisp_t *array;
     jsstr_t *str;
-    int i;
+    DWORD i;
     HRESULT hres = S_OK;
 
     static const WCHAR indexW[] = {'i','n','d','e','x',0};




More information about the wine-patches mailing list