Last Comment Bug 650083 - nsEditor.cpp:1147: warning: unused variable 'rv'
: nsEditor.cpp:1147: warning: unused variable 'rv'
Status: RESOLVED FIXED
[build_warning]
:
Product: Core
Classification: Components
Component: Editor (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla6
Assigned To: :Ehsan Akhgari (out sick)
:
Mentors:
http://tinderbox.mozilla.org/showlog....
Depends on:
Blocks: 407127
  Show dependency treegraph
 
Reported: 2011-04-14 12:20 PDT by Daniel Holbert [:dholbert]
Modified: 2011-04-15 07:03 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (v1) (1.03 KB, patch)
2011-04-14 13:33 PDT, :Ehsan Akhgari (out sick)
roc: review+
Details | Diff | Review

Description Daniel Holbert [:dholbert] 2011-04-14 12:20:09 PDT
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
Comment 1 Daniel Holbert [:dholbert] 2011-04-14 12:21:03 PDT
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
Comment 2 :Ehsan Akhgari (out sick) 2011-04-14 13:33:10 PDT
Created attachment 526094 [details] [diff] [review]
Patch (v1)

Sorry!
Comment 3 :Ehsan Akhgari (out sick) 2011-04-15 07:03:10 PDT
http://hg.mozilla.org/mozilla-central/rev/0c1749cfcc38

Note You need to log in before you can comment on or make changes to this bug.