Closed Bug 770287 Opened 8 years ago Closed 8 years ago

IDBIndex.h:162:25: warning: ‘...mActorParent’ will be initialized after... ‘...mKeyPath’ [-Wreorder]

Categories

(Core :: Storage: IndexedDB, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch fixSplinter Review
In file included from ../../../mozilla/dom/indexedDB/IDBIndex.cpp:9:0:
../../../mozilla/dom/indexedDB/IDBIndex.h: In constructor ‘mozilla::dom::indexedDB::IDBIndex::IDBIndex()’:
../../../mozilla/dom/indexedDB/IDBIndex.h:162:25: warning: ‘mozilla::dom::indexedDB::IDBIndex::mActorParent’ will be initialized after [-Wreorder]
../../../mozilla/dom/indexedDB/IDBIndex.h:158:11: warning:   ‘mozilla::dom::indexedDB::KeyPath mozilla::dom::indexedDB::IDBIndex::mKeyPath’ [-Wreorder]
../../../mozilla/dom/indexedDB/IDBIndex.cpp:395:1: warning:   when initialized here [-Wreorder]

This is from this block:
395 IDBIndex::IDBIndex()
396 : mId(LL_MININT),
397   mActorChild(nsnull),
398   mActorParent(nsnull),
399   mKeyPath(0),

and mKeyPath is declared before mActorChild in the class, so it should be listed before it in the init list.  Attached patch makes this change.
Attachment #638448 - Flags: review?(khuey)
https://hg.mozilla.org/mozilla-central/rev/8ea07a17e25c
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.