Closed Bug 883688 Opened 11 years ago Closed 11 years ago

Uninit |gotLambda| in ion/IonBuilder.cpp

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

(Whiteboard: [js:t])

Attachments

(1 file)

Clang correctly identifies this problem: /home/njn/moz/mi6/js/src/ion/IonBuilder.cpp:4719:9: warning: variable 'gotLambda' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (calleeTypes) { ^~~~~~~~~~~ /home/njn/moz/mi6/js/src/ion/IonBuilder.cpp:4723:18: note: uninitialized use occurs here JS_ASSERT_IF(gotLambda, originals.length() <= 1); ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./dist/include/js/Utility.h:43:49: note: expanded from macro 'JS_ASSERT_IF' #define JS_ASSERT_IF(cond, expr) MOZ_ASSERT_IF(cond, expr) ^ ./dist/include/mozilla/Assertions.h:305:12: note: expanded from macro 'MOZ_ASSERT_IF' if (cond) \ ^~~~ /home/njn/moz/mi6/js/src/ion/IonBuilder.cpp:4719:5: note: remove the 'if' if its condition is always true if (calleeTypes) { ^~~~~~~~~~~~~~~~~ /home/njn/moz/mi6/js/src/ion/IonBuilder.cpp:4717:19: note: initialize the variable 'gotLambda' to silence this warning bool gotLambda; ^ = false
I don't anything about this code, but this fix looks reasonable.
Attachment #763303 - Flags: review?(kvijayan)
Comment on attachment 763303 [details] [diff] [review] Fix uninitialized |gotLambda| in ion/IonBuilder.cpp Review of attachment 763303 [details] [diff] [review]: ----------------------------------------------------------------- Thanks Nicholas.
Attachment #763303 - Flags: review?(kvijayan) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: