jscript: Fixed some clang warnings.
This commit is contained in:
parent
c0ab36949d
commit
020245bba1
|
@ -133,6 +133,9 @@ static HRESULT Array_length(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISP
|
|||
HRESULT hres;
|
||||
|
||||
hres = to_number(ctx, get_arg(dp, 0), ei, &num);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
if(V_VT(&num) == VT_I4)
|
||||
len = V_I4(&num);
|
||||
else
|
||||
|
|
|
@ -2415,7 +2415,7 @@ static HRESULT typeof_exprval(script_ctx_t *ctx, exprval_t *exprval, jsexcept_t
|
|||
}
|
||||
|
||||
VariantClear(&val);
|
||||
return S_OK;
|
||||
return hres;
|
||||
}
|
||||
|
||||
HRESULT typeof_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD flags, jsexcept_t *ei, exprval_t *ret)
|
||||
|
|
|
@ -441,7 +441,8 @@ static HRESULT Function_apply(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DI
|
|||
}
|
||||
}
|
||||
|
||||
hres = call_function(ctx, function, this_obj, &args, retv, ei, caller);
|
||||
if(SUCCEEDED(hres))
|
||||
hres = call_function(ctx, function, this_obj, &args, retv, ei, caller);
|
||||
|
||||
if(this_obj)
|
||||
IDispatch_Release(this_obj);
|
||||
|
|
|
@ -522,7 +522,8 @@ static HRESULT WINAPI JScript_AddNamedItem(IActiveScript *iface,
|
|||
item->flags = dwFlags;
|
||||
item->name = heap_strdupW(pstrName);
|
||||
if(!item->name) {
|
||||
IDispatch_Release(disp);
|
||||
if(disp)
|
||||
IDispatch_Release(disp);
|
||||
heap_free(item);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
|
|
@ -249,7 +249,6 @@ static BOOL unescape(WCHAR *str)
|
|||
}
|
||||
|
||||
p++;
|
||||
c = 0;
|
||||
|
||||
switch(*p) {
|
||||
case '\'':
|
||||
|
|
|
@ -150,7 +150,7 @@ static HRESULT Number_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, D
|
|||
|
||||
if(exp) {
|
||||
if(log_radix==0)
|
||||
buf[idx++] = '\0';
|
||||
buf[idx] = 0;
|
||||
else {
|
||||
static const WCHAR formatW[] = {'(','e','%','c','%','d',')',0};
|
||||
WCHAR ch;
|
||||
|
|
Loading…
Reference in New Issue