Closed
Bug 1087498
Opened 8 years ago
Closed 8 years ago
mozilla-central/accessible/ipc/DocAccessibleParent.cpp:47:14: warning: unused variable ‘id’ [-Wunused-variable]
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: dholbert, Assigned: tbsaunde)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.07 KB,
patch
|
davidb
:
review+
|
Details | Diff | Splinter Review |
Build warning in opt builds:
{
mozilla-central/accessible/ipc/DocAccessibleParent.cpp:47:14: warning: unused variable ‘id’ [-Wunused-variable]
}
This is from this variable:
> 46 for (uint32_t i = 0; i < consumed; i++) {
> 47 uint64_t id = aData.NewTree()[i].ID();
> 48 MOZ_ASSERT(mAccessibles.GetEntry(id));
> 49 }
As shown here, 'id' is indeed unused in opt builds.
Reporter | ||
Comment 1•8 years ago
|
||
Is this whole loop even useful in opt builds? (Does line 47 actually do anything, on its own?) If yes, we should use DebugOnly for 'id'. If no, then perhaps this whole loop should just be wrapped in #ifdef DEBUG. (I tend to think the latter option -- #ifdef DEBUG -- is what we want.)
Flags: needinfo?(tbsaunde+mozbugs)
Assignee | ||
Comment 2•8 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #1) > Is this whole loop even useful in opt builds? (Does line 47 actually do > anything, on its own?) > If yes, we should use DebugOnly for 'id'. > If no, then perhaps this whole loop should just be wrapped in #ifdef DEBUG. > > (I tend to think the latter option -- #ifdef DEBUG -- is what we want.) yeah, I'll ifdef that loop out.
Flags: needinfo?(tbsaunde+mozbugs)
Assignee | ||
Comment 3•8 years ago
|
||
Attachment #8509699 -
Flags: review?(dbolter)
Updated•8 years ago
|
Attachment #8509699 -
Flags: review?(dbolter) → review+
Reporter | ||
Comment 5•8 years ago
|
||
[needinfo=tbsaunde to make sure this gets landed]
Flags: needinfo?(tbsaunde+mozbugs)
Comment 6•8 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b7aa4fec51e5
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(tbsaunde+mozbugs)
Updated•8 years ago
|
Flags: qe-verify-
You need to log in
before you can comment on or make changes to this bug.
Description
•