Closed Bug 1115264 Opened 10 years ago Closed 10 years ago

layout/generic/nsRubyFrame.cpp:429:18 [-Wsometimes-uninitialized] variable 'y' is used uninitialized whenever 'if' condition is false

Categories

(Core :: Layout: Block and Inline, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37
Tracking Status
firefox36 --- unaffected
firefox37 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

(Blocks 2 open bugs)

Details

(Keywords: regression)

Attachments

(1 file)

MOZ_ASSERT_UNREACHABLE is a no-op in release builds, so nscoord y is uninitialized if rubyPosition style is not NS_STYLE_RUBY_POSITION_OVER or NS_STYLE_RUBY_POSITION_UNDER. This code was added in bug 1055665. layout/generic/nsRubyFrame.cpp:429:18 [-Wsometimes-uninitialized] variable 'y' is used uninitialized whenever 'if' condition is false Should this MOZ_ASSERT_UNREACHABLE be a fatal MOZ_CRASH? Or is there an appropriate fallback value for y?
Attachment #8541099 - Flags: review?(dholbert)
I don't think the code could reach this place currently. But anyway, I think offsetRect.Y() could be a reasonable fallback value. When we finally support inter-character, y would be this value.
Comment on attachment 8541099 [details] [diff] [review] nsRubyFrame_Wsometimes-uninitialized.patch Sounds good. r=me
Attachment #8541099 - Flags: review?(dholbert) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: