Last Comment Bug 659187 - nsMemoryReporterManager init list out of order (nsMemoryReporterManager.h:24:11: warning: 'nsMemoryReporter::mKind' will be initialized after...'nsCString nsMemoryReporter::mDesc')
: nsMemoryReporterManager init list out of order (nsMemoryReporterManager.h:24:...
Status: RESOLVED FIXED
[build_warning]
:
Product: Core
Classification: Components
Component: General (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla6
Assigned To: Daniel Holbert [:dholbert]
:
Mentors:
Depends on:
Blocks: 657327
  Show dependency treegraph
 
Reported: 2011-05-23 16:18 PDT by Daniel Holbert [:dholbert]
Modified: 2011-05-24 03:42 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
first fix attempt (986 bytes, patch)
2011-05-23 16:21 PDT, Daniel Holbert [:dholbert]
n.nethercote: review+
Details | Diff | Splinter Review

Description Daniel Holbert [:dholbert] 2011-05-23 16:18:23 PDT
{
nsMemoryReporterManager.h: In constructor 'nsMemoryReporter::nsMemoryReporter(nsCString&, nsCString&, PRInt32, nsCString&, PRInt64)':
nsMemoryReporterManager.h:24:11: warning: 'nsMemoryReporter::mKind' will be initialized after
nsMemoryReporterManager.h:23:20: warning:   'nsCString nsMemoryReporter::mDesc'
nsMemoryReporterManager.cpp:401:1: warning:   when initialized here
}
Comment 1 Daniel Holbert [:dholbert] 2011-05-23 16:21:39 PDT
Created attachment 534614 [details] [diff] [review]
first fix attempt
Comment 2 Nicholas Nethercote [:njn] 2011-05-23 17:51:44 PDT
Comment on attachment 534614 [details] [diff] [review]
first fix attempt

Review of attachment 534614 [details] [diff] [review]:
-----------------------------------------------------------------

r=me, but even better would be to reorder the declarations in nsMemoryReporterManager.h:  mProcess, mPath, mKind, mDesc, mMemoryUsed;  that matches the order used everywhere else.
Comment 3 Daniel Holbert [:dholbert] 2011-05-24 03:42:01 PDT
Pushed, doing the "even better" suggestion from comment 2 (save for the fact that |mProcess| isn't a member variable declared in nsMemoryReporterManager):

http://hg.mozilla.org/mozilla-central/rev/c460861442b6

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