Closed Bug 822025 Opened 13 years ago Closed 13 years ago

nsCSSFrameConstructor.cpp:9752:7: warning: variable 'wrapperType' is used uninitialized whenever switch default is taken

Categories

(Core :: Layout, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: jwatt, Assigned: jwatt)

Details

Attachments

(1 file)

I'm getting the following warning building nsCSSFrameConstructor.cpp: nsCSSFrameConstructor.cpp:9752:7: warning: variable 'wrapperType' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] default: ^~~~~~~ nsCSSFrameConstructor.cpp:9757:60: note: uninitialized use occurs here const PseudoParentData& pseudoData = sPseudoParentData[wrapperType]; ^~~~~~~~~~~ nsCSSFrameConstructor.cpp:9734:5: note: variable 'wrapperType' is declared here ParentType wrapperType; ^
Attached patch patchSplinter Review
Attachment #692628 - Flags: review?(bzbarsky)
Comment on attachment 692628 [details] [diff] [review] patch r=me, I guess, but does using MOZ_NOT_REACHED instead of NS_NOTREACHED shut up the warning too? If so, I'd vastly prefer that....
Attachment #692628 - Flags: review?(bzbarsky) → review+
(In reply to Boris Zbarsky (:bz) from comment #2) > does using MOZ_NOT_REACHED instead of NS_NOTREACHED shut > up the warning too? If so, I'd vastly prefer that.... Nice. It does indeed, so that's what I pushed. https://hg.mozilla.org/integration/mozilla-inbound/rev/5dd106eee315
Assignee: nobody → jwatt
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: