Closed Bug 503067 Opened 15 years ago Closed 15 years ago

[HTML5] New warnings from HTML5 parser: suggest parentheses around assignment used as truth value

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: benjamin, Assigned: hsivonen)

References

()

Details

Attachments

(1 file)

parser/html/nsHtml5Portability.cpp:137: suggest parentheses around assignment used as truth value
parser/html/nsHtml5Portability.cpp:139: suggest parentheses around assignment used as truth value

Blame shows that this is either really confusing or a bug... I'm not sure which.
http://hg.mozilla.org/mozilla-central/annotate/8b5103cb12a6b62558ba6ad64109f50bb66bd820/parser/html/nsHtml5Portability.cpp/#l139
Line 137 needs parentheses. Line 139 is bug 502600.
Attached patch Add parenthesesSplinter Review
I don't see the warning with this patch with Apple's GCC.
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Attachment #387466 - Flags: superreview?(benjamin)
Attachment #387466 - Flags: review?(benjamin)
Attachment #387466 - Flags: superreview?(benjamin)
Attachment #387466 - Flags: review?(benjamin)
Attachment #387466 - Flags: review+
http://hg.mozilla.org/mozilla-central/rev/c40a68c662da
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: