Closed Bug 477963 Opened 11 years ago Closed 11 years ago

fix gcc use of uninitialized variable warning in nsBlockFrame's FindChildContaining

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: dbaron, Assigned: dbaron)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
gcc warns about uninitialized use of |child| in FindChildContaining in nsBlockFrame.cpp.  The warning seems correct given that the loop is a while loop when it really should be a do-while loop, since we're assuming that the aFrame given is non-null.  This adds an assertion and changes the loop, which silences the warning (and saves a test on entering the loop).
Attachment #361714 - Flags: superreview?(roc)
Attachment #361714 - Flags: review?(roc)
Attachment #361714 - Flags: superreview?(roc)
Attachment #361714 - Flags: superreview+
Attachment #361714 - Flags: review?(roc)
Attachment #361714 - Flags: review+
http://hg.mozilla.org/mozilla-central/rev/816e42aa808c
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Priority: -- → P4
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.