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; }
http://bugs.winehq.org/show_bug.cgi?id=15266
--- Comment #1 from Dmitry Timoshkov dmitry@codeweavers.com 2008-09-13 03:54:11 --- The compiler might be on crack. Probably the real place where the warning comes from variable_list_eval() when var_list == NULL.
http://bugs.winehq.org/show_bug.cgi?id=15266
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jacek@codeweavers.com
--- Comment #2 from Austin English austinenglish@gmail.com 2008-09-13 18:40:40 --- CC'ing Jacek, as he wrote the code in question.
http://bugs.winehq.org/show_bug.cgi?id=15266
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID
--- Comment #3 from Juan Lang juan_lang@yahoo.com 2008-09-15 10:10:13 --- That error report is clearly useless, as hres is certainly initialized before use.
http://bugs.winehq.org/show_bug.cgi?id=15266
James Hawkins truiken@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from James Hawkins truiken@gmail.com 2008-09-15 10:16:48 --- Closing.
http://bugs.winehq.org/show_bug.cgi?id=15266
--- Comment #5 from Dmitry Timoshkov dmitry@codeweavers.com 2008-09-15 23:12:16 --- (In reply to comment #3)
That error report is clearly useless, as hres is certainly initialized before use.
It seems to be not the case in the variable_list_eval() body.
http://bugs.winehq.org/show_bug.cgi?id=15266
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |REOPENED Resolution|INVALID |
--- Comment #6 from Austin English austinenglish@gmail.com 2008-09-17 18:07:00 --- (In reply to comment #5)
(In reply to comment #3)
That error report is clearly useless, as hres is certainly initialized before use.
It seems to be not the case in the variable_list_eval() body.
Reopening, still valid.
http://bugs.winehq.org/show_bug.cgi?id=15266
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED
--- Comment #7 from Austin English austinenglish@gmail.com 2008-09-17 18:07:34 --- Fixed by Dmitry's patch:
http://source.winehq.org/git/wine.git/?a=commit;h=e853f1076cd79cde8927b8c9fc...
http://bugs.winehq.org/show_bug.cgi?id=15266
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org 2008-09-19 11:17:49 --- Closing bugs fixed in 1.1.5.
http://bugs.winehq.org/show_bug.cgi?id=15266
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Platform|All |Other OS/Version|All |other
--- Comment #9 from Austin English austinenglish@gmail.com 2012-02-23 15:14:59 CST --- Removing deprecated 'All' Platform/OS.