diff --git a/editor/Makefile.in b/editor/Makefile.in index 69a6bc2815c..4ca9e9c2183 100644 --- a/editor/Makefile.in +++ b/editor/Makefile.in @@ -39,6 +39,7 @@ DEPTH = .. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ +FAIL_ON_WARNINGS = 1 include $(DEPTH)/config/autoconf.mk diff --git a/editor/composer/src/Makefile.in b/editor/composer/src/Makefile.in index f40fe219627..14e3378c5dc 100644 --- a/editor/composer/src/Makefile.in +++ b/editor/composer/src/Makefile.in @@ -39,6 +39,7 @@ DEPTH = ../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ +FAIL_ON_WARNINGS = 1 include $(DEPTH)/config/autoconf.mk diff --git a/editor/libeditor/base/Makefile.in b/editor/libeditor/base/Makefile.in index 66b7463345a..66abeb19759 100644 --- a/editor/libeditor/base/Makefile.in +++ b/editor/libeditor/base/Makefile.in @@ -39,6 +39,7 @@ DEPTH = ../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ +FAIL_ON_WARNINGS = 1 include $(DEPTH)/config/autoconf.mk diff --git a/editor/libeditor/html/Makefile.in b/editor/libeditor/html/Makefile.in index 6d77987425f..cb1e68884dc 100644 --- a/editor/libeditor/html/Makefile.in +++ b/editor/libeditor/html/Makefile.in @@ -39,6 +39,7 @@ DEPTH = ../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ +FAIL_ON_WARNINGS = 1 include $(DEPTH)/config/autoconf.mk diff --git a/editor/libeditor/html/nsHTMLEditRules.cpp b/editor/libeditor/html/nsHTMLEditRules.cpp index 4634ea3d278..10782cfbda3 100644 --- a/editor/libeditor/html/nsHTMLEditRules.cpp +++ b/editor/libeditor/html/nsHTMLEditRules.cpp @@ -9277,8 +9277,10 @@ nsHTMLEditRules::DocumentModifiedWorker() nsCOMPtr kungFuDeathGrip(mHTMLEditor); nsCOMPtr selection; - nsresult res = mHTMLEditor->GetSelection(getter_AddRefs(selection)); - NS_ENSURE_SUCCESS(res, ); + nsresult rv = mHTMLEditor->GetSelection(getter_AddRefs(selection)); + if (NS_FAILED(rv)) { + return; + } // Delete our bogus node, if we have one, since the document might not be // empty any more. diff --git a/editor/libeditor/html/nsHTMLEditor.cpp b/editor/libeditor/html/nsHTMLEditor.cpp index dc0464eba22..1ace9a70c28 100644 --- a/editor/libeditor/html/nsHTMLEditor.cpp +++ b/editor/libeditor/html/nsHTMLEditor.cpp @@ -5740,16 +5740,21 @@ nsHTMLEditor::ResetRootElementAndEventTarget() RemoveEventListeners(); mRootElement = nsnull; nsresult rv = InstallEventListeners(); - NS_ENSURE_SUCCESS(rv, ); + if (NS_FAILED(rv)) { + return; + } // We must have mRootElement now. nsCOMPtr root; rv = GetRootElement(getter_AddRefs(root)); - NS_ENSURE_SUCCESS(rv, ); - NS_ENSURE_TRUE(mRootElement, ); + if (NS_FAILED(rv) || !mRootElement) { + return; + } rv = BeginningOfDocument(); - NS_ENSURE_SUCCESS(rv, ); + if (NS_FAILED(rv)) { + return; + } // When this editor has focus, we need to reset the selection limiter to // new root. Otherwise, that is going to be done when this gets focus. diff --git a/editor/libeditor/html/nsWSRunObject.cpp b/editor/libeditor/html/nsWSRunObject.cpp index cdf500b394e..1dccf6c546c 100644 --- a/editor/libeditor/html/nsWSRunObject.cpp +++ b/editor/libeditor/html/nsWSRunObject.cpp @@ -1853,6 +1853,7 @@ nsWSRunObject::GetAsciiWSBounds(PRInt16 aDir, nsIDOMNode *aNode, PRInt32 aOffset nsresult nsWSRunObject::FindRun(nsIDOMNode *aNode, PRInt32 aOffset, WSFragment **outRun, bool after) { + *outRun = nsnull; // given a dompoint, find the ws run that is before or after it, as caller needs NS_ENSURE_TRUE(aNode && outRun, NS_ERROR_NULL_POINTER); diff --git a/editor/libeditor/text/Makefile.in b/editor/libeditor/text/Makefile.in index 532d7f1855a..135898009bb 100644 --- a/editor/libeditor/text/Makefile.in +++ b/editor/libeditor/text/Makefile.in @@ -39,6 +39,7 @@ DEPTH = ../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ +FAIL_ON_WARNINGS = 1 include $(DEPTH)/config/autoconf.mk diff --git a/editor/txmgr/src/Makefile.in b/editor/txmgr/src/Makefile.in index fa1c8af0925..0f604f09936 100644 --- a/editor/txmgr/src/Makefile.in +++ b/editor/txmgr/src/Makefile.in @@ -39,6 +39,7 @@ DEPTH = ../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ +FAIL_ON_WARNINGS = 1 include $(DEPTH)/config/autoconf.mk diff --git a/editor/txmgr/tests/Makefile.in b/editor/txmgr/tests/Makefile.in index 40bbab92add..0eae3bc63f2 100644 --- a/editor/txmgr/tests/Makefile.in +++ b/editor/txmgr/tests/Makefile.in @@ -40,6 +40,7 @@ DEPTH = ../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ +FAIL_ON_WARNINGS = 1 include $(DEPTH)/config/autoconf.mk diff --git a/editor/txmgr/tests/TestTXMgr.cpp b/editor/txmgr/tests/TestTXMgr.cpp index 8402f71122c..6aa794fba6b 100644 --- a/editor/txmgr/tests/TestTXMgr.cpp +++ b/editor/txmgr/tests/TestTXMgr.cpp @@ -4702,7 +4702,7 @@ aggregation_batch_stress_test() // // 500 iterations sends 2,630,250 transactions through the system!! // - iterations = 500 + 500 #endif ; return stress_test(&factory, iterations); diff --git a/editor/txtsvc/src/Makefile.in b/editor/txtsvc/src/Makefile.in index 42b4f6a6ee2..00a088705ae 100644 --- a/editor/txtsvc/src/Makefile.in +++ b/editor/txtsvc/src/Makefile.in @@ -39,6 +39,7 @@ DEPTH = ../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ +FAIL_ON_WARNINGS = 1 include $(DEPTH)/config/autoconf.mk diff --git a/editor/txtsvc/src/nsTextServicesDocument.cpp b/editor/txtsvc/src/nsTextServicesDocument.cpp index 522bbb8c3de..af7ca24680b 100644 --- a/editor/txtsvc/src/nsTextServicesDocument.cpp +++ b/editor/txtsvc/src/nsTextServicesDocument.cpp @@ -3263,11 +3263,11 @@ nsTextServicesDocument::ComparePoints(nsIDOMNode* aParent1, PRInt32 aOffset1, nsIDOMNode* aParent2, PRInt32 aOffset2, PRInt32 *aResult) { - nsresult result; - + *aResult = 0; + if (!sRangeHelper) { - result = CallGetService("@mozilla.org/content/range-utils;1", - &sRangeHelper); + nsresult result = CallGetService("@mozilla.org/content/range-utils;1", + &sRangeHelper); NS_ENSURE_TRUE(sRangeHelper, result); }