Closed Bug 587484 Opened 14 years ago Closed 13 years ago

warning: suggest parentheses around assignment used as truth value in while (... = GetNextContinuation())

Categories

(Core :: Layout, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b12

People

(Reporter: timeless, Assigned: timeless)

References

Details

Attachments

(1 file, 1 obsolete file)

layout/base/nsCSSFrameConstructor.cpp:
 In function ‘void UpdateViewsForTree(nsIFrame*, nsIViewManager*, nsFrameManager*, nsChangeHint)’:
7618: warning: suggest parentheses around assignment used as truth value
Attached patch patch (obsolete) — Splinter Review
the only other instance that i can find in this file uses an explicit compare against nsnull:

      while ((f = childItems.FirstChild()) != nsnull) {

whichever makes people happy, however i don't think using != nsnull will fit on this line.
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #466152 - Flags: review?(dbaron)
Blocks: 576649
Summary: warning: suggest parentheses around assignment used as truth value In function UpdateViewsForTree → warning: suggest parentheses around assignment used as truth value in while (... = GetNextContinuation())
Attachment #466152 - Attachment is obsolete: true
Attachment #466153 - Flags: review?(matspal)
Attachment #466152 - Flags: review?(dbaron)
Comment on attachment 466153 [details] [diff] [review]
patch for more instances

r=dbaron
Attachment #466153 - Flags: review?(matspal) → review+
(Sorry about adding that warning.  In my build, it's intermixed with
three others :-( so that's probably why I missed it.)
Attachment #466153 - Flags: approval2.0?
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/ca7bbf37c6d7
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b12
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: