Closed Bug 575701 Opened 14 years ago Closed 14 years ago

nsDOMEventTargetWrapperCache.cpp has a empty "NS_IMPL_CYCLE_COLLECTION_UNLINK" block, triggering "warning: unused variable 'tmp'"

Categories

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

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dholbert, Assigned: wfernandom2004)

References

Details

(Whiteboard: [build_warning])

Attachments

(1 file)

I just noticed this warning go by in build spam:
> content/base/src/nsDOMEventTargetWrapperCache.cpp: In member function 'virtual nsresult nsDOMEventTargetWrapperCache::cycleCollection::Unlink(void*)':
> content/base/src/nsDOMEventTargetWrapperCache.cpp:65: warning: unused variable 'tmp'

It points to this block of code:
> 65 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(nsDOMEventTargetWrapperCache,
> 66                                                 nsDOMEventTargetHelper)
> 67 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsDOMEventTargetWrapperCache.cpp?mark=65-67#65
(This file was added in the last few weeks, in bug 472529)

It looks fishy to me that we have an "UNLINK_BEGIN" declaration immediately followed by an "UNLINK_END", with nothing between them.  If there's nothing to unlink, then that block should just be removed, right?  (or if there is something to unlink, then it needs to actually be unlinked...)
Summary: nsDOMEventTargetWrapperCache.cpp has a no-op "NS_IMPL_CYCLE_COLLECTION_UNLINK" block → nsDOMEventTargetWrapperCache.cpp has a empty "NS_IMPL_CYCLE_COLLECTION_UNLINK" block, triggering "warning: unused variable 'tmp'"
Attached patch v1Splinter Review
Assignee: nobody → wfernandom2004
Status: NEW → ASSIGNED
Attachment #455139 - Flags: review?(Olli.Pettay)
Attachment #455139 - Flags: review?(Olli.Pettay) → review+
http://hg.mozilla.org/mozilla-central/rev/9dc37d4b23e1
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: