Closed Bug 406765 Opened 13 years ago Closed 13 years ago
GCC warns about uninitialized variable in js
After landing the patch for bug 376957 GCC has started to complain at -Os optimization: gcc -o Linux_All_DBG.OBJ/jsemit.o -c -Wall -Wno-format -DGCC_OPT_BUG -g -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R -DX86_LINUX -DDEBUG -DDEBUG_igor -DJS_THREADSAFE -DEDITLINE -ILinux_All_DBG.OBJ -I/home/igor/build/browser-trunk-dbg/dist/include/nspr -Os jsemit.c jsemit.c: In function 'js_EmitTree': jsemit.c:3916: warning: 'ale' may be used uninitialized in this function It would be nice to address this annoyance.
The patch adds ale = NULL to quell GCC and changes the switch into the if/else with asserts to minimize the code.
The bug blocks 376957 as this is formally a regression.
Comment on attachment 291422 [details] [diff] [review] fix v1 Whoops, thanks for fixing. Waldo can r+ too (I think he's a peer -- he should be if not, I think). /be
Yeah, I am -- looks good to me.
Comment on attachment 291422 [details] [diff] [review] fix v1 This is a fix for GCC warning to have less noise when compiling SpiderMonkey.
Attachment #291422 - Flags: approvalM10?
Comment on attachment 291422 [details] [diff] [review] fix v1 Taking this as it is a P2.
Attachment #291422 - Flags: approvalM10? → approvalM10+
I checked in the patch from comment 1 to the CVS trunk: http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&branch=HEAD&cvsroot=%2Fcvsroot&date=explicit&mindate=1196931120&maxdate=1196931192&who=igor%mir2.org
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.