Closed
Bug 843363
Opened 12 years ago
Closed 12 years ago
nsDirectoryViewer.cpp:1172:11: warning: variable 'rv' set but not used [-Wunused-but-set-variable]
Categories
(Core :: XUL, defect)
Core
XUL
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: dholbert, Assigned: Cykesiopka)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.10 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
Newish build warning in GCC 4.7
{
xpfe/components/directory/nsDirectoryViewer.cpp: In member function 'virtual nsresult nsHTTPIndex::ArcLabelsOut(nsIRDFResource*, nsISimpleEnumerator**)':
xpfe/components/directory/nsDirectoryViewer.cpp:1172:11: warning: variable 'rv' set but not used [-Wunused-but-set-variable]
}
The code looks like this:
> 1169 NS_IMETHODIMP
> 1170 nsHTTPIndex::ArcLabelsOut(nsIRDFResource *aSource, nsISimpleEnumerator **_retval)
> 1171 {
> 1172 nsresult rv = NS_ERROR_UNEXPECTED;
[..]
> 1182 if (mInner)
> 1183 {
> 1184 rv = mInner->ArcLabelsOut(aSource, getter_AddRefs(anonArcs));
> 1185 }
> 1186
> 1187 return NS_NewUnionEnumerator(_retval, child, anonArcs);
> 1188 }
Bug 819936 removed the last use of this variable:
https://hg.mozilla.org/mozilla-central/rev/08e6e5bc8b5f#l8.24
Should we be checking the ArcLabelsOut() return-value for success?
![]() |
Assignee | |
Updated•12 years ago
|
Flags: needinfo?(trev.saunders)
![]() |
Assignee | |
Comment 2•12 years ago
|
||
(In reply to Trevor Saunders (:tbsaunde) from comment #1)
> no clue
Ok, thanks anyways.
![]() |
Assignee | |
Comment 3•12 years ago
|
||
Don't know if this is what should be done, but here's a patch that just removes the nsresult.
Attachment #785332 -
Flags: review?(bzbarsky)
![]() |
||
Comment 4•12 years ago
|
||
Comment on attachment 785332 [details] [diff] [review]
Proposed Patch
Sure. r=me
Attachment #785332 -
Flags: review?(bzbarsky) → review+
![]() |
Assignee | |
Updated•12 years ago
|
Comment 5•12 years ago
|
||
Keywords: checkin-needed
Comment 6•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Comment 7•7 years ago
|
||
Moving to Core:XUL per https://bugzilla.mozilla.org/show_bug.cgi?id=1455336
Component: XP Toolkit/Widgets: XUL → XUL
You need to log in
before you can comment on or make changes to this bug.
Description
•