Last Comment Bug 770287 - IDBIndex.h:162:25: warning: ‘...mActorParent’ will be initialized after... ‘...mKeyPath’ [-Wreorder]
: IDBIndex.h:162:25: warning: ‘...mActorParent’ will be initialized after... ‘....
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: IndexedDB (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: mozilla16
Assigned To: Daniel Holbert [:dholbert]
:
:
Mentors:
Depends on:
Blocks: buildwarning 765834
  Show dependency treegraph
 
Reported: 2012-07-02 12:12 PDT by Daniel Holbert [:dholbert]
Modified: 2012-07-04 06:38 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix (514 bytes, patch)
2012-07-02 12:12 PDT, Daniel Holbert [:dholbert]
khuey: review+
Details | Diff | Splinter Review

Description Daniel Holbert [:dholbert] 2012-07-02 12:12:34 PDT
Created attachment 638448 [details] [diff] [review]
fix

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.
Comment 1 Daniel Holbert [:dholbert] 2012-07-03 14:11:21 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/8ea07a17e25c
Comment 2 Ryan VanderMeulen [:RyanVM] 2012-07-04 06:38:42 PDT
https://hg.mozilla.org/mozilla-central/rev/8ea07a17e25c

Note You need to log in before you can comment on or make changes to this bug.