Closed Bug 757644 Opened 8 years ago Closed 8 years ago

init list build warning for mock_Link.h

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

Noticed this build warning today:
{
In file included from ../../../../../../toolkit/components/places/tests/cpp/test_IHistory.cpp:12:0:
../../../../../dist/include/mozilla/dom/Link.h: In constructor 'mozilla::dom::Link::Link(mozilla::dom::Element*)':
../../../../../dist/include/mozilla/dom/Link.h:129:8: warning: 'mozilla::dom::Link::mRegistered' will be initialized after
../../../../../dist/include/mozilla/dom/Link.h:121:19: warning:   'mozilla::dom::Element* const mozilla::dom::Link::mElement'
../../../../../../toolkit/components/places/tests/cpp/mock_Link.h:73:1: warning:   when initialized here
}

This is because bug 747516 reordered the member data within the 'Link' structure, without updating the constructor's init list in mock_Link.h.

Trivial fix -- just reorder the init list in mock_Link.h
Attached patch fixSplinter Review
This moves mLinkState and mRegistered to be after mElement, in mock_Link.h.  

This matches the change made to the member-variable ordering in Link.h -- see the very end of this cset for reference:
 http://hg.mozilla.org/mozilla-central/rev/25f093f5a4bd#l2.2
Attachment #626219 - Flags: review?(ehsan)
Attachment #626219 - Flags: review?(ehsan) → review+
https://hg.mozilla.org/mozilla-central/rev/0cf1ff867a37
Assignee: nobody → dholbert
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.