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)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: dholbert, Assigned: Cykesiopka)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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?
Flags: needinfo?(trev.saunders)
no clue
Flags: needinfo?(trev.saunders)
(In reply to Trevor Saunders (:tbsaunde) from comment #1) > no clue Ok, thanks anyways.
Attached patch Proposed PatchSplinter Review
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 on attachment 785332 [details] [diff] [review] Proposed Patch Sure. r=me
Attachment #785332 - Flags: review?(bzbarsky) → review+
Assignee: nobody → cykesiopka.bmo
Status: NEW → ASSIGNED
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Component: XP Toolkit/Widgets: XUL → XUL
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: