If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

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

RESOLVED FIXED in mozilla34

Status

()

Core
Gecko Profiler
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

(Blocks: 1 bug)

Trunk
mozilla34
All
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

3 years ago
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")) {
                                         ^
}
(Assignee)

Comment 1

3 years ago
Created attachment 8463466 [details] [diff] [review]
fix: add a layer of parens

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 2

3 years ago
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+
(Assignee)

Comment 3

3 years ago
Created attachment 8463707 [details] [diff] [review]
fix v1a [r=njn] (updated reviewer in commit message)

Thanks! Tree's closed; reuploading patch with reviewer adjusted, and using checkin-needed.
Attachment #8463466 - Attachment is obsolete: true
Attachment #8463707 - Flags: review+
(Assignee)

Updated

3 years ago
Attachment #8463707 - Attachment description: fix v1a (with reviewer adjusted) → fix v1a (updated reviewer in commit message)
(Assignee)

Updated

3 years ago
Attachment #8463707 - Attachment description: fix v1a (updated reviewer in commit message) → fix v1a [r=njn] (updated reviewer in commit message)
(Assignee)

Updated

3 years ago
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/2047ca9ae242
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/2047ca9ae242
https://hg.mozilla.org/mozilla-central/rev/2047ca9ae242
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.