Closed
Bug 962080
Opened 12 years ago
Closed 12 years ago
js/src/jit/IonBuilder.cpp:4105:9: warning: ‘inlineable’ may be used uninitialized in this function [-Wmaybe-uninitialized]
Categories
(Core :: JavaScript Engine: JIT, defect)
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: froydnj, Assigned: froydnj)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
1.05 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
Patch coming in a moment.
![]() |
Assignee | |
Comment 1•12 years ago
|
||
Good practice to always provide default cases for switches anyway.
Attachment #8362966 -
Flags: review?(jdemooij)
Comment 2•12 years ago
|
||
Comment on attachment 8362966 [details] [diff] [review]
fix maybe-uninitialized variable warning in IonBuilder.cpp
Review of attachment 8362966 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/jit/IonBuilder.cpp
@@ +4098,5 @@
> inlineable = true;
> break;
> + case InliningDecision_Error:
> + default:
> + return false;
Can you instead add a MOZ_ASSUME_UNREACHABLE? If somebody adds a new enum value, we should fail somehow if he/she forgets to handle it here instead of silently treating it as OOM.
Attachment #8362966 -
Flags: review?(jdemooij)
![]() |
Assignee | |
Comment 3•12 years ago
|
||
Now with less code rearrangement and more MOZ_ASSUME_UNREACHABLE.
Attachment #8363695 -
Flags: review?(jdemooij)
![]() |
Assignee | |
Updated•12 years ago
|
Attachment #8362966 -
Attachment is obsolete: true
Comment 4•12 years ago
|
||
Comment on attachment 8363695 [details] [diff] [review]
fix maybe-uninitialized variable warning in IonBuilder.cpp
Review of attachment 8363695 [details] [diff] [review]:
-----------------------------------------------------------------
Awesome, thanks!
Attachment #8363695 -
Flags: review?(jdemooij) → review+
![]() |
Assignee | |
Comment 5•12 years ago
|
||
Flags: in-testsuite-
Comment 6•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in
before you can comment on or make changes to this bug.
Description
•