Jacek Caban : jscript: Fixed some Coverity issues.
Alexandre Julliard
julliard at winehq.org
Tue Nov 27 14:30:49 CST 2012
Module: wine
Branch: master
Commit: ac41380b944e8409961a65c146f925bd2e056cda
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ac41380b944e8409961a65c146f925bd2e056cda
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Nov 27 12:29:06 2012 +0100
jscript: Fixed some Coverity issues.
---
dlls/jscript/array.c | 2 +-
dlls/jscript/compile.c | 2 ++
dlls/jscript/dispex.c | 1 +
3 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/jscript/array.c b/dlls/jscript/array.c
index e255880..fef37e6 100644
--- a/dlls/jscript/array.c
+++ b/dlls/jscript/array.c
@@ -325,7 +325,7 @@ static HRESULT array_join(script_ctx_t *ctx, jsdisp_t *array, DWORD length, cons
TRACE("= %s\n", debugstr_jsstr(ret));
if(r)
- *r = ret ? jsval_string(ret) : jsval_string(jsstr_empty());
+ *r = jsval_string(ret);
else
jsstr_release(ret);
return S_OK;
diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c
index 2e18c50..501c340 100644
--- a/dlls/jscript/compile.c
+++ b/dlls/jscript/compile.c
@@ -1395,6 +1395,8 @@ static HRESULT compile_continue_statement(compiler_ctx_t *ctx, branch_statement_
WARN("Label is not a loop\n");
return JS_E_INVALID_CONTINUE;
}
+
+ assert(pop_ctx != NULL);
}else {
for(pop_ctx = ctx->stat_ctx; pop_ctx; pop_ctx = pop_ctx->next) {
if(pop_ctx->continue_label)
diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c
index 8bc4d1d..4eda704 100644
--- a/dlls/jscript/dispex.c
+++ b/dlls/jscript/dispex.c
@@ -454,6 +454,7 @@ static HRESULT prop_put(jsdisp_t *This, dispex_prop_t *prop, jsval_t val, IServi
vdisp_release(&vthis);
return hres;
}
+ /* fall through */
case PROP_PROTREF:
prop->type = PROP_JSVAL;
prop->flags = PROPF_ENUM;
More information about the wine-cvs
mailing list