Closed
Bug 422484
Opened 16 years ago
Closed 16 years ago
Add parens around macro if conditions
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
People
(Reporter: dmandelin, Assigned: dmandelin)
Details
Attachments
(2 files)
1.08 KB,
patch
|
benjamin
:
review+
damons
:
approval1.9+
|
Details | Diff | Splinter Review |
1.01 KB,
patch
|
jaas
:
review+
jaas
:
superreview+
|
Details | Diff | Splinter Review |
There are 2 places in SVG where if conditions are "missing" parens, like if NS_FAILED(rv) { ... This compiles fine, because of the definition of the macro, but it looks funny. More importantly, it prevents NS_FAILED from being an inline function, which makes static analysis harder. So, can we add them, as in the attached patch? mozilla-central is where I really want this, that's the main target for static analysis, but it might be good to have it in CVS trunk as well.
Comment 1•16 years ago
|
||
Comment on attachment 308926 [details] [diff] [review] Patch to add parens to macro if conditions This is trivially correct. I've already fixed two of these! Reviewers should be catching these :-(
Attachment #308926 -
Flags: review+
Attachment #308926 -
Flags: approval1.9?
Comment 2•16 years ago
|
||
FWIW, here's 2 more of this same type of bug, in Camino code: http://mxr.mozilla.org/seamonkey/source/camino/src/formfill/wallet.mm#840 840 if NS_FAILED(rv) { 854 if NS_FAILED(rv) {
Updated•16 years ago
|
Assignee: nobody → dmandelin
Comment 3•16 years ago
|
||
Attachment #308939 -
Flags: review?(benjamin)
Comment 4•16 years ago
|
||
The nsSVGGlyphFrame code will disappear anyway as a side effect of bug 392233
Updated•16 years ago
|
Attachment #308939 -
Flags: review?(benjamin) → review?(joshmoz)
Comment 5•16 years ago
|
||
Comment on attachment 308926 [details] [diff] [review] Patch to add parens to macro if conditions a1.9+=damons
Attachment #308926 -
Flags: approval1.9? → approval1.9+
Comment on attachment 308939 [details] [diff] [review] patch for same issue in camino code wow, nice
Attachment #308939 -
Flags: superreview+
Attachment #308939 -
Flags: review?(joshmoz)
Attachment #308939 -
Flags: review+
Updated•16 years ago
|
Keywords: checkin-needed
Updated•16 years ago
|
Attachment #308939 -
Flags: approval1.9?
Updated•16 years ago
|
Attachment #308939 -
Flags: approval1.9?
Comment 7•16 years ago
|
||
Both patches checked in. Checking in svg/base/src/nsSVGGlyphFrame.cpp; /cvsroot/mozilla/layout/svg/base/src/nsSVGGlyphFrame.cpp,v <-- nsSVGGlyphFrame.cpp new revision: 1.119; previous revision: 1.118 done Checking in xul/base/src/nsXULPopupManager.cpp; /cvsroot/mozilla/layout/xul/base/src/nsXULPopupManager.cpp,v <-- nsXULPopupManager.cpp new revision: 1.54; previous revision: 1.53 done Checking in wallet.mm; /cvsroot/mozilla/camino/src/formfill/wallet.mm,v <-- wallet.mm new revision: 1.11; previous revision: 1.10 done
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Keywords: checkin-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•