Closed
Bug 500202
Opened 15 years ago
Closed 15 years ago
Unused variable build warnings.
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
People
(Reporter: davidb, Assigned: davidb)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.44 KB,
patch
|
MarcoZ
:
review+
|
Details | Diff | Splinter Review |
Compiler complains about unused variables.
Assignee | ||
Comment 1•15 years ago
|
||
Attachment #384876 -
Flags: review?(surkov.alexander)
Attachment #384876 -
Flags: review?(marco.zehe)
Comment 2•15 years ago
|
||
Comment on attachment 384876 [details] [diff] [review] trivial fix. trivial indeed, r=me. Thanks!
Attachment #384876 -
Flags: review?(marco.zehe) → review+
Assignee | ||
Updated•15 years ago
|
Attachment #384876 -
Flags: review?(surkov.alexander)
Assignee | ||
Comment 3•15 years ago
|
||
pushed: http://hg.mozilla.org/mozilla-central/rev/113c5916881f
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 4•15 years ago
|
||
I think this requires more investigations because we shouldn't hide errors in general.
Assignee | ||
Comment 5•15 years ago
|
||
We aren't hiding errors here. The return value rv was stored in a variable, but the variable was unused in that code path. I think the compiler warning and the fix are valid.
Comment 6•15 years ago
|
||
(In reply to comment #5) > We aren't hiding errors here. The return value rv was stored in a variable, but > the variable was unused in that code path. I think the compiler warning and the > fix are valid. I mean it's wrong nsresult variable wan't used - this is what I call hiding errors.
Assignee | ||
Comment 7•15 years ago
|
||
Aha I see what you mean and I generally agree. In this case I was thinking the aName.IsEmpty check is sufficient. I suppose we could check the return value and ASSERT but is that what we want here?
Comment 8•15 years ago
|
||
I think NS_ENSURE_SUCCESS should work for us. We could use ASSERT if we're sure it won't happen. Though it's probably worth to have special case for xblAccessible->GetAccessibleName(aName) to not propagate XBL's mistakes. However if XBL's accessibleName throws Components.results.ERROR then we should use it.
You need to log in
before you can comment on or make changes to this bug.
Description
•