Andrew Talbot : jscript: Avoid signed-unsigned integer comparisons.
Alexandre Julliard
julliard at winehq.org
Mon Feb 11 13:06:30 CST 2013
Module: wine
Branch: master
Commit: 6b5a18f61923dd9f867f2747bac5f0eb394da5dc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6b5a18f61923dd9f867f2747bac5f0eb394da5dc
Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date: Sat Feb 9 22:32:02 2013 +0000
jscript: Avoid signed-unsigned integer comparisons.
---
dlls/jscript/date.c | 2 +-
dlls/jscript/error.c | 2 +-
dlls/jscript/function.c | 7 ++++---
dlls/jscript/regexp.c | 2 +-
4 files changed, 7 insertions(+), 6 deletions(-)
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..056f04a 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','('};
@@ -809,8 +810,8 @@ static HRESULT construct_function(script_ctx_t *ctx, unsigned argc, jsval_t *arg
}
}
- while(--i >= 0)
- jsstr_release(params[i]);
+ while(i)
+ jsstr_release(params[--i]);
heap_free(params);
if(FAILED(hres))
return hres;
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-cvs
mailing list