Closed Bug 717034 Opened 13 years ago Closed 13 years ago

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

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 716904

People

(Reporter: dholbert, Unassigned)

References

(Blocks 1 open bug)

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:
{
nsHTMLTableSectionElement.cpp:188:12: error: variable ‘rv’ set but not used [-Werror=unused-but-set-variable]
}

Here's the lifetime of that variable:
> 151 NS_IMETHODIMP
> 152 nsHTMLTableSectionElement::InsertRow(PRInt32 aIndex,
> 153                                      nsIDOMHTMLElement** aValue)
> 154 {
[...]
> 188   nsresult rv;
[...]
> 193     rv = InsertBefore(rowNode, refRow, getter_AddRefs(retChild));
[...]
> 195     rv = AppendChild(rowNode, getter_AddRefs(retChild));
[...]
> 202   return NS_OK;
> 203 }
As the warning ( / error) indicates, we set it a bunch of times but never bother to check it.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.