nsEditor.cpp:1147: warning: unused variable 'rv'

RESOLVED FIXED in mozilla6

Status

()

Core
Editor
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: dholbert, Assigned: Ehsan)

Tracking

Trunk
mozilla6
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [build_warning], URL)

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
Filing bug on these  warnings:
> editor/libeditor/base/nsEditor.cpp: In member function 'virtual nsresult nsEditor::GetDocumentCharacterSet(nsACString_internal&)':
> editor/libeditor/base/nsEditor.cpp:1147: warning: unused variable 'rv'
> editor/libeditor/base/nsEditor.cpp: In member function 'virtual nsresult nsEditor::SetDocumentCharacterSet(const nsACString_internal&)':
> editor/libeditor/base/nsEditor.cpp:1158: warning: unused variable 'rv'

Looks like these have been unused since their chunks of code were added in this cset for bug 407127, a few weeks back:
http://hg.mozilla.org/mozilla-central/rev/81c3902d4e78
(Reporter)

Comment 1

6 years ago
The code in question is:
1147   nsresult rv = NS_OK;
1148   nsCOMPtr<nsIDocument> doc = do_QueryReferent(mDocWeak);
1149   NS_ENSURE_TRUE(doc, NS_ERROR_UNEXPECTED);
1150 
1151   characterSet = doc->GetDocumentCharacterSet();
1152   return NS_OK;

and:
1158   nsresult rv = NS_OK;
1159   nsCOMPtr<nsIDocument> doc = do_QueryReferent(mDocWeak);
1160   NS_ENSURE_TRUE(doc, NS_ERROR_UNEXPECTED);
1161 
1162   doc->SetDocumentCharacterSet(characterSet);
1163   return NS_OK;

http://mxr.mozilla.org/mozilla-central/source/editor/libeditor/base/nsEditor.cpp#1145
Whiteboard: [build_warning]
Created attachment 526094 [details] [diff] [review]
Patch (v1)

Sorry!
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #526094 - Flags: review?(roc)
Attachment #526094 - Flags: review?(roc) → review+
http://hg.mozilla.org/mozilla-central/rev/0c1749cfcc38
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla6
You need to log in before you can comment on or make changes to this bug.