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

RESOLVED FIXED in mozilla6

Status

()

Core
General
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

Trunk
mozilla6
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [build_warning])

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
{
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)

Comment 1

6 years ago
Created attachment 534614 [details] [diff] [review]
first fix attempt
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+
(Assignee)

Comment 3

6 years ago
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
Last Resolved: 6 years ago
OS: Linux → All
Hardware: x86_64 → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla6
(Assignee)

Updated

6 years ago
Attachment #534614 - Attachment description: fix → first fix attempt
You need to log in before you can comment on or make changes to this bug.