Closed Bug 659187 Opened 11 years ago Closed 11 years ago

nsMemoryReporterManager init list out of order (nsMemoryReporterManager.h:24:11: warning: 'nsMemoryReporter::mKind' will be initialized after...'nsCString nsMemoryReporter::mDesc')

Categories

(Core :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla6

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

(Whiteboard: [build_warning])

Attachments

(1 file)

{
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
}
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #534614 - Flags: review?(nnethercote)
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.
Attachment #534614 - Flags: review?(nnethercote) → review+
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
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
OS: Linux → All
Hardware: x86_64 → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla6
Attachment #534614 - Attachment description: fix → first fix attempt
You need to log in before you can comment on or make changes to this bug.