nsHTMLTableElement.cpp:709:12: error: variable ‘rv’ set but not used [-Werror=unused-but-set-variable]

RESOLVED DUPLICATE of bug 716904

Status

()

defect
RESOLVED DUPLICATE of bug 716904
8 years ago
8 years ago

People

(Reporter: dholbert, Unassigned)

Tracking

(Blocks 1 bug)

Trunk
All
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Bug 716338 turned on warnings-as-errors in content/html/content/src/Makefile.in

This breaks my local build (with --enable-warnings-as-errors), due to this build warning:
{
nsHTMLTableElement.cpp:709:12: error: variable ‘rv’ set but not used [-Werror=unused-but-set-variable]
}

Here's the lifetime of the variable in question:
> 679 NS_IMETHODIMP
> 680 nsHTMLTableElement::InsertRow(PRInt32 aIndex, nsIDOMHTMLElement** aValue)
> 681 {
[...]
> 709   nsresult rv;
[...]
> 738         rv = parent->AppendChild(newRowNode, getter_AddRefs(retChild));
[...]
> 743         rv = parent->InsertBefore(newRowNode, refRow,
> 744                                   getter_AddRefs(retChild));
[...]
> 780         rv = AppendChildTo(newRowGroup, true);
[...]
> 817   return NS_OK;
> 818 }

As the warning indicates, we set it a bunch of times but never bother to check it.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 716904
You need to log in before you can comment on or make changes to this bug.