Closed
Bug 1148506
Opened 10 years ago
Closed 10 years ago
TestCodeGenBinding.cpp:10424:10: warning: unused variable 'result' [-Wunused-variable], in DOMProxyHandler::delete_
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.35 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
Noticed two "unused variable" build warnings, for generated file TestCodeGenBinding.cpp:
obj/dom/bindings/TestCodeGenBinding.cpp:10424:10: warning: unused variable 'result' [-Wunused-variable]
bool result;
^
..and...
obj/dom/bindings/TestCodeGenBinding.cpp:43418:10: warning: unused variable 'result' [-Wunused-variable]
bool result;
^
(Same warning, just different line numbers.)
Both warnings are in a function with this function-signature:
bool
DOMProxyHandler::delete_(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id, JS::ObjectOpResult& opresult) const
Assignee | ||
Comment 1•10 years ago
|
||
The first warning is pointing to code that looks like this:
====
if (IsArrayIndex(index)) {
bool deleteSucceeded;
bool result;
bool found = false;
mozilla::dom::TestIndexedDeleterWithRetvalInterface* self = UnwrapProxy(proxy);
deleteSucceeded = self->IndexedDeleter(index, found);
MOZ_ASSERT(!JS_IsExceptionPending(cx));
if (!found) {
deleteSucceeded = true;
}
return deleteSucceeded ? opresult.succeed() : opresult.failCantDelete();
}
return dom::DOMProxyHandler::delete_(cx, proxy, id, opresult);
====
As you can see, "result" is declared & then never used.
Comment 2•10 years ago
|
||
This became dead code in bug 1113369 part 5, where we started using deleteSucceeded for the operation result. Should be able to just replace the
decls = "bool result;\n"
bit in getDeleterBody with decls = "".
Blocks: 1113369
Assignee | ||
Comment 4•10 years ago
|
||
(I verified that this doesn't break my build, and the warning goes away.)
Comment 5•10 years ago
|
||
Comment on attachment 8593010 [details] [diff] [review]
fix v1
Review of attachment 8593010 [details] [diff] [review]:
-----------------------------------------------------------------
Thank you.
Attachment #8593010 -
Flags: review?(jorendorff) → review+
Assignee | ||
Updated•10 years ago
|
Flags: in-testsuite-
Comment 7•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•