Closed Bug 1045110 Opened 10 years ago Closed 10 years ago

nsMemoryReporterManager.cpp:103:39: warning: suggest parentheses around assignment used as truth value [-Wparentheses]

Categories

(Core :: Gecko Profiler, defect)

All
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Newish build warning:
{
 xpcom/base/nsMemoryReporterManager.cpp: In function 'nsresult GetProcSelfSmapsPrivate(int64_t*)':
 xpcom/base/nsMemoryReporterManager.cpp: suggest parentheses around assignment used as truth value
 xpcom/base/nsMemoryReporterManager.cpp:103:39: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
       while (ptr = strstr(ptr, "Private")) {
                                         ^
}
Attached patch fix: add a layer of parens (obsolete) — Splinter Review
This patch adds a layer of parens (which suppresses the compiler's "= vs == in while condition" concern).
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #8463466 - Flags: review?(janx)
Comment on attachment 8463466 [details] [diff] [review]
fix: add a layer of parens

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

Thanks for fixing the warning! This file is outside my jurisdiction, forwarding the review to Nicholas.
Attachment #8463466 - Flags: review?(n.nethercote)
Attachment #8463466 - Flags: review?(janx)
Attachment #8463466 - Flags: feedback+
Attachment #8463466 - Flags: review?(n.nethercote) → review+
Thanks! Tree's closed; reuploading patch with reviewer adjusted, and using checkin-needed.
Attachment #8463466 - Attachment is obsolete: true
Attachment #8463707 - Flags: review+
Attachment #8463707 - Attachment description: fix v1a (with reviewer adjusted) → fix v1a (updated reviewer in commit message)
Attachment #8463707 - Attachment description: fix v1a (updated reviewer in commit message) → fix v1a [r=njn] (updated reviewer in commit message)
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/2047ca9ae242
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: