Closed
Bug 133711
Opened 23 years ago
Closed 22 years ago
Unreachable statement (duplicate return) in nsXULAttribute and nsSVGAttributes (Bugs found via linting....)
Categories
(Core :: XUL, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla1.1beta
People
(Reporter: cyent, Assigned: timwatt)
References
()
Details
Attachments
(2 files, 1 obsolete file)
|
1.47 KB,
patch
|
Details | Diff | Splinter Review | |
|
1.78 KB,
patch
|
timeless
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
This is a list of bugs found by antic (http://artho.com/jlint/)
The vast majority of false positives have been removed leaving only
definite bugs and highly suspicious cases.
======================================================================
Same one as in svg
The "return NS_OK" is unreachable, probably a bug.
~/builds/mozilla/content/xul/content/src/nsXULAttributes.cpp:600:9: Unreachable
statement
nsXULAttributes::RemoveNamedItem(const nsAReadableString& aName,
nsIDOMNode** aReturn)
{
nsCOMPtr<nsIDOMElement> element( do_QueryInterface(mContent) );
if (element) {
return element->RemoveAttribute(aName);
*aReturn = nsnull; // XXX should be the element we just removed
return NS_OK;
}
else {
return NS_ERROR_FAILURE;
}
}
Comment 1•23 years ago
|
||
That would be "XP Toolkit/Widgets: XUL".
Assignee: asa → hyatt
Component: Browser-General → XP Toolkit/Widgets: XUL
QA Contact: doronr → shrir
Comment 2•23 years ago
|
||
cvsblame sez waterson.
bbaetz, this was also copy-pasted into SVG: nsSVGAttributes.cpp, line 931.
Assignee: hyatt → waterson
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Which component is XUL? Bugs found via linting.... → Unreachable statement (duplicate return) in nsXULAttribute and nsSVGAttributes (Bugs found via linting....)
Comment 3•23 years ago
|
||
SVG case is bug 133710; feel free to fix both of these at the same time.
Comment 4•23 years ago
|
||
*** Bug 133710 has been marked as a duplicate of this bug. ***
Comment 5•23 years ago
|
||
Comment 6•23 years ago
|
||
How embarrassing. While we're at it, maybe we should remove the
else-after-return, too?
Updated•23 years ago
|
Priority: -- → P3
Target Milestone: --- → mozilla1.0.1
Target Milestone: mozilla1.0.1 → mozilla1.1beta
Attachment #92147 -
Flags: review+
Jul 11 15:43 Out with the old, in with the new.
Assignee: waterson → bzbarsky
Status: ASSIGNED → NEW
Comment 9•23 years ago
|
||
Comment on attachment 92147 [details] [diff] [review]
The previous patch without the else-after-return
This leaves aReturn un-initialized. Unacceptable (even if equivalent to the
exisiting code).
Attachment #92147 -
Flags: needs-work+
Comment 10•23 years ago
|
||
This is not mine; please mail me when you need review instead of assigning bugs
to me. To patch author, to fix the patch. ;)
Assignee: bzbarsky → riceman+bmo
| Assignee | ||
Comment 11•23 years ago
|
||
I also pre-emptively fixed the grammar of the comment, just to avoid another
round =)
Attachment #92147 -
Attachment is obsolete: true
Comment 12•23 years ago
|
||
Comment on attachment 92193 [details] [diff] [review]
Initialize out param, too
sr=bzbarsky; please file bugs on fixing those aReturn values if there aren't
such bugs already.
Attachment #92193 -
Flags: superreview+
Attachment #92193 -
Flags: review+
| Assignee | ||
Comment 13•22 years ago
|
||
This has had R+SR for a while. Has it bitrotted yet? I don't have a tree handy
(or the capacity for a tree on this machine). I can check its status in a week
or so. If it hasn't bitrotted (miraculously), is there something holding it
from being checked in?
Comment 14•22 years ago
|
||
This has not bitrotted, and even builds. I'll try to check it in early next
week, but if someone has time before then that would be great.
Comment 15•22 years ago
|
||
03/04/2003 18:35 timeless%mozdev.org mozilla/ content/ xul/ content/ src/
nsXULAttributes.cpp 1.62 3/5 Bug 133711 Unreachable statement (duplicate
return) in nsXULAttribute and nsSVGAttributes (Bugs found via linting....)
patch by riceman+bmo@mail.rit.edu r=timeless sr=bz
therefore, marking FIXED.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: shrir → xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•