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... ‘....
Product: Core
Classification: Components
Component: DOM: IndexedDB (show other bugs)
: Trunk
: x86_64 Linux
-- normal (vote)
: mozilla16
Assigned To: Daniel Holbert [:dholbert] (vacation, returning 2/27)
: Hsin-Yi Tsai [:hsinyi]
Depends on:
Blocks: buildwarning 765834
  Show dependency treegraph
Reported: 2012-07-02 12:12 PDT by Daniel Holbert [:dholbert] (vacation, returning 2/27)
Modified: 2012-07-04 06:38 PDT (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

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

Description User image Daniel Holbert [:dholbert] (vacation, returning 2/27) 2012-07-02 12:12:34 PDT
Created attachment 638448 [details] [diff] [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.
Comment 1 User image Daniel Holbert [:dholbert] (vacation, returning 2/27) 2012-07-03 14:11:21 PDT
Comment 2 User image Ryan VanderMeulen [:RyanVM] 2012-07-04 06:38:42 PDT

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