From c7e1286f2d59a4ebb202f4ffa4c35dd3af081e87 Mon Sep 17 00:00:00 2001 From: "cmanske%netscape.com" Date: Wed, 12 Jul 2000 01:15:17 +0000 Subject: [PATCH] Fixed warnings revealed by Linux build in table editing code git-svn-id: svn://10.0.0.236/trunk@74066 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/base/nsTableEditor.cpp | 10 ++++------ mozilla/editor/libeditor/html/nsTableEditor.cpp | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/mozilla/editor/base/nsTableEditor.cpp b/mozilla/editor/base/nsTableEditor.cpp index 59cdd6ea730..af744daee09 100644 --- a/mozilla/editor/base/nsTableEditor.cpp +++ b/mozilla/editor/base/nsTableEditor.cpp @@ -989,7 +989,6 @@ nsHTMLEditor::DeleteTableColumn(PRInt32 aNumber) // Use selected cells to determine what rows to delete cell = firstCell; - PRBool deleteCol = PR_FALSE; while (cell) { if (cell != firstCell) @@ -1086,7 +1085,7 @@ nsHTMLEditor::DeleteColumn(nsIDOMElement *aTable, PRInt32 aColIndex) if (rowCount == 1) { nsCOMPtr selection; - nsresult res = GetSelection(getter_AddRefs(selection)); + res = GetSelection(getter_AddRefs(selection)); if (NS_FAILED(res)) return res; if (!selection) return NS_ERROR_FAILURE; return DeleteTable2(aTable, selection); @@ -1171,7 +1170,6 @@ nsHTMLEditor::DeleteTableRow(PRInt32 aNumber) // Use selected cells to determine what rows to delete cell = firstCell; - PRBool deleteRow = PR_FALSE; while (cell) { if (cell != firstCell) @@ -2243,7 +2241,7 @@ nsHTMLEditor::MergeCells(nsCOMPtr aTargetCell, while (hasChild) { cellToMerge->GetLastChild(getter_AddRefs(cellChild)); - nsresult res = DeleteNode(cellChild); + res = DeleteNode(cellChild); if (NS_FAILED(res)) return res; res = InsertNode(cellChild, targetCell, insertIndex); @@ -2685,7 +2683,7 @@ nsHTMLEditor::GetCellContext(nsIDOMSelection **aSelection, nsCOMPtr cellOrTableElement; PRInt32 selectedCount; nsAutoString tagName; - nsresult res = GetSelectedOrParentTableElement(*getter_AddRefs(cellOrTableElement), tagName, selectedCount); + res = GetSelectedOrParentTableElement(*getter_AddRefs(cellOrTableElement), tagName, selectedCount); if (NS_FAILED(res)) return res; if (tagName == NS_LITERAL_STRING("table")) { @@ -2920,7 +2918,7 @@ nsHTMLEditor::GetFirstSelectedCellInTable(nsIDOMElement **aCell, PRInt32 *aRowIn while (cell) { - nsresult res = GetNextSelectedCell(getter_AddRefs(cell), nsnull); + res = GetNextSelectedCell(getter_AddRefs(cell), nsnull); if (NS_FAILED(res)) return res; if (cell) { diff --git a/mozilla/editor/libeditor/html/nsTableEditor.cpp b/mozilla/editor/libeditor/html/nsTableEditor.cpp index 59cdd6ea730..af744daee09 100644 --- a/mozilla/editor/libeditor/html/nsTableEditor.cpp +++ b/mozilla/editor/libeditor/html/nsTableEditor.cpp @@ -989,7 +989,6 @@ nsHTMLEditor::DeleteTableColumn(PRInt32 aNumber) // Use selected cells to determine what rows to delete cell = firstCell; - PRBool deleteCol = PR_FALSE; while (cell) { if (cell != firstCell) @@ -1086,7 +1085,7 @@ nsHTMLEditor::DeleteColumn(nsIDOMElement *aTable, PRInt32 aColIndex) if (rowCount == 1) { nsCOMPtr selection; - nsresult res = GetSelection(getter_AddRefs(selection)); + res = GetSelection(getter_AddRefs(selection)); if (NS_FAILED(res)) return res; if (!selection) return NS_ERROR_FAILURE; return DeleteTable2(aTable, selection); @@ -1171,7 +1170,6 @@ nsHTMLEditor::DeleteTableRow(PRInt32 aNumber) // Use selected cells to determine what rows to delete cell = firstCell; - PRBool deleteRow = PR_FALSE; while (cell) { if (cell != firstCell) @@ -2243,7 +2241,7 @@ nsHTMLEditor::MergeCells(nsCOMPtr aTargetCell, while (hasChild) { cellToMerge->GetLastChild(getter_AddRefs(cellChild)); - nsresult res = DeleteNode(cellChild); + res = DeleteNode(cellChild); if (NS_FAILED(res)) return res; res = InsertNode(cellChild, targetCell, insertIndex); @@ -2685,7 +2683,7 @@ nsHTMLEditor::GetCellContext(nsIDOMSelection **aSelection, nsCOMPtr cellOrTableElement; PRInt32 selectedCount; nsAutoString tagName; - nsresult res = GetSelectedOrParentTableElement(*getter_AddRefs(cellOrTableElement), tagName, selectedCount); + res = GetSelectedOrParentTableElement(*getter_AddRefs(cellOrTableElement), tagName, selectedCount); if (NS_FAILED(res)) return res; if (tagName == NS_LITERAL_STRING("table")) { @@ -2920,7 +2918,7 @@ nsHTMLEditor::GetFirstSelectedCellInTable(nsIDOMElement **aCell, PRInt32 *aRowIn while (cell) { - nsresult res = GetNextSelectedCell(getter_AddRefs(cell), nsnull); + res = GetNextSelectedCell(getter_AddRefs(cell), nsnull); if (NS_FAILED(res)) return res; if (cell) {