Closed Bug 406765 Opened 17 years ago Closed 17 years ago

GCC warns about uninitialized variable in js_EmitTree

Categories

(Core :: JavaScript Engine, defect, P2)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: igor, Assigned: igor)

References

Details

Attachments

(1 file)

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.
Flags: blocking1.9?
Attached patch fix v1Splinter Review
The patch adds ale = NULL to quell GCC and changes the switch into the if/else with asserts to minimize the code.
Attachment #291422 - Flags: review?(brendan)
The bug blocks 376957 as this is formally a regression.
Blocks: 376957
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
Attachment #291422 - Flags: review?(brendan)
Attachment #291422 - Flags: review+
Attachment #291422 - Flags: approval1.9+
Yeah, I am -- looks good to me.
Flags: blocking1.9? → blocking1.9+
Priority: -- → P2
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: 17 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: