GCC warns about uninitialized variable in js_EmitTree

RESOLVED FIXED

Status

()

Core
JavaScript Engine
P2
minor
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: Igor Bukanov, Assigned: Igor Bukanov)

Tracking

Trunk
Points:
---
Bug Flags:
blocking1.9 +
in-testsuite -
in-litmus -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

10 years ago
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?
(Assignee)

Comment 1

10 years ago
Created attachment 291422 [details] [diff] [review]
fix v1

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)
(Assignee)

Comment 2

10 years ago
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+

Comment 4

10 years ago
Yeah, I am -- looks good to me.

Updated

10 years ago
Flags: blocking1.9? → blocking1.9+
Priority: -- → P2
(Assignee)

Comment 5

10 years ago
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+
(Assignee)

Comment 7

10 years ago
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
Last Resolved: 10 years ago
Resolution: --- → FIXED

Updated

10 years ago
Flags: in-testsuite-
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.