http://bugs.winehq.org/show_bug.cgi?id=15266
Summary: jscript: engine.c - unitialized variable Product: Wine Version: 1.1.4 Platform: All OS/Version: All Status: NEW Keywords: source Severity: enhancement Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com
Tried compiling Wine with -Werror, got a few interesting results. First one:
austin@austin-desktop:~/wine-git/dlls/jscript$ make gcc -c -I. -I. -I../../include -I../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -Werror -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith -g -O2 -o engine.o engine.c cc1: warnings being treated as errors engine.c: In function ‘var_statement_eval’: engine.c:500: warning: ‘hres’ is used uninitialized in this function make: *** [engine.o] Error 1
Relevant code portion: /* ECMA-262 3rd Edition 12.2 */ HRESULT var_statement_eval(exec_ctx_t *ctx, statement_t *_stat, return_type_t *rt, VARIANT *ret) { var_statement_t *stat = (var_statement_t*)_stat; HRESULT hres;
TRACE("\n");
hres = variable_list_eval(ctx, stat->variable_list, &rt->ei); if(FAILED(hres)) return hres;
V_VT(ret) = VT_EMPTY; return S_OK; }