23169: Fix uninitialized variables, including one which was disallowing splitting lines by hitting return. r=jfrancis

This commit is contained in:
akkana%netscape.com 2000-01-06 22:35:04 +00:00
Родитель 95a9138fae
Коммит 016e5d6225
4 изменённых файлов: 12 добавлений и 8 удалений

Просмотреть файл

@ -1447,7 +1447,7 @@ nsEditor::EndComposition(void)
{
if (!mInIMEMode) return NS_OK; // nothing to do
nsresult result;
nsresult result = NS_OK;
// commit the IME transaction..we can get at it via the transaction mgr.
// Note that this means IME won't work without an undo stack!
@ -2159,7 +2159,7 @@ nsEditor::SplitNodeImpl(nsIDOMNode * aExistingRightNode,
{
// get selection
nsCOMPtr<nsIDOMSelection> selection;
GetSelection(getter_AddRefs(selection));
result = GetSelection(getter_AddRefs(selection));
if (NS_FAILED(result)) return result;
if (!selection) return NS_ERROR_NULL_POINTER;

Просмотреть файл

@ -1324,7 +1324,9 @@ NS_IMETHODIMP nsHTMLEditor::DeleteSelection(nsIEditor::EDirection aAction)
result = selCont->IntraLineMove(PR_TRUE, PR_TRUE);
aAction = eNone;
break;
default: break; // avoid compiler warnings
default: // avoid several compiler warnings
result = NS_OK;
break;
}
if (NS_FAILED(result))
{
@ -4601,7 +4603,7 @@ void nsHTMLEditor::ResetTextSelectionForRange(nsIDOMNode *aParent,
{
if (!aParent || !aSelection) { return; } // XXX: should return an error
nsCOMPtr<nsIDOMNode> startNode, endNode;
PRInt32 startOffset, endOffset;
PRInt32 startOffset=0, endOffset=0;
nsresult result;
nsCOMPtr<nsIContentIterator> iter;

Просмотреть файл

@ -1447,7 +1447,7 @@ nsEditor::EndComposition(void)
{
if (!mInIMEMode) return NS_OK; // nothing to do
nsresult result;
nsresult result = NS_OK;
// commit the IME transaction..we can get at it via the transaction mgr.
// Note that this means IME won't work without an undo stack!
@ -2159,7 +2159,7 @@ nsEditor::SplitNodeImpl(nsIDOMNode * aExistingRightNode,
{
// get selection
nsCOMPtr<nsIDOMSelection> selection;
GetSelection(getter_AddRefs(selection));
result = GetSelection(getter_AddRefs(selection));
if (NS_FAILED(result)) return result;
if (!selection) return NS_ERROR_NULL_POINTER;

Просмотреть файл

@ -1324,7 +1324,9 @@ NS_IMETHODIMP nsHTMLEditor::DeleteSelection(nsIEditor::EDirection aAction)
result = selCont->IntraLineMove(PR_TRUE, PR_TRUE);
aAction = eNone;
break;
default: break; // avoid compiler warnings
default: // avoid several compiler warnings
result = NS_OK;
break;
}
if (NS_FAILED(result))
{
@ -4601,7 +4603,7 @@ void nsHTMLEditor::ResetTextSelectionForRange(nsIDOMNode *aParent,
{
if (!aParent || !aSelection) { return; } // XXX: should return an error
nsCOMPtr<nsIDOMNode> startNode, endNode;
PRInt32 startOffset, endOffset;
PRInt32 startOffset=0, endOffset=0;
nsresult result;
nsCOMPtr<nsIContentIterator> iter;