Andrew Nguyen : jscript: Fix some errors detected by Valgrind.

Alexandre Julliard julliard at winehq.org
Wed Dec 10 07:41:55 CST 2008


Module: wine
Branch: master
Commit: a6bdc47152964d06bdb97d4a8b2490c31e59b86b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a6bdc47152964d06bdb97d4a8b2490c31e59b86b

Author: Andrew Nguyen <arethusa26 at gmail.com>
Date:   Wed Dec 10 03:05:50 2008 -0600

jscript: Fix some errors detected by Valgrind.

---

 dlls/jscript/engine.c   |    4 ++--
 dlls/jscript/function.c |    2 --
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c
index 063bd60..f4d4796 100644
--- a/dlls/jscript/engine.c
+++ b/dlls/jscript/engine.c
@@ -1499,7 +1499,7 @@ HRESULT new_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD flags, j
 HRESULT call_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD flags, jsexcept_t *ei, exprval_t *ret)
 {
     call_expression_t *expr = (call_expression_t*)_expr;
-    VARIANT func, var;
+    VARIANT var;
     exprval_t exprval;
     DISPPARAMS dp;
     HRESULT hres;
@@ -1520,7 +1520,7 @@ HRESULT call_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD flags,
                 V_VT(&var) = VT_EMPTY;
             break;
         default:
-            FIXME("unimplemented type %d\n", V_VT(&func));
+            FIXME("unimplemented type %d\n", exprval.type);
             hres = E_NOTIMPL;
         }
 
diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c
index 96c41a9..314d585 100644
--- a/dlls/jscript/function.c
+++ b/dlls/jscript/function.c
@@ -191,7 +191,6 @@ static HRESULT invoke_constructor(FunctionInstance *function, LCID lcid, DISPPAR
         VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller)
 {
     DispatchEx *this_obj;
-    VARIANT var;
     HRESULT hres;
 
     hres = create_object(function->dispex.ctx, &function->dispex, &this_obj);
@@ -203,7 +202,6 @@ static HRESULT invoke_constructor(FunctionInstance *function, LCID lcid, DISPPAR
     if(FAILED(hres))
         return hres;
 
-    VariantClear(&var);
     V_VT(retv) = VT_DISPATCH;
     V_DISPATCH(retv) = (IDispatch*)_IDispatchEx_(this_obj);
     return S_OK;




More information about the wine-cvs mailing list