Avoid "unused variable 'tmp'" warnings for empty CC traverse method implementations

RESOLVED FIXED in mozilla16

Status

()

Core
XPCOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

unspecified
mozilla16
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [build_warning])

Attachments

(1 attachment)

moz/mozilla-central/dom/indexedDB/IDBWrapperCache.cpp:14:1: warning: unused variable 'tmp' [-Wunused-variable]
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(IDBWrapperCache,
^
../../dist/include/nsCycleCollectionParticipant.h:517:3: note: expanded from macro 'NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED'
  NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(_class)                     \
  ^
../../dist/include/nsCycleCollectionParticipant.h:504:13: note: expanded from macro 'NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL'
    _class *tmp = static_cast<_class*>(Downcast(s));
            ^
1 warning generated.

The UNLINK_END macro has this protection in place.  We should add it for TRAVERSE too.
Whiteboard: [build_warning]
Created attachment 640909 [details] [diff] [review]
Patch (v1)
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #640909 - Flags: review?(bugs)

Updated

5 years ago
Attachment #640909 - Flags: review?(bugs) → review+
http://hg.mozilla.org/integration/mozilla-inbound/rev/7edaa46a402a
Target Milestone: --- → mozilla16
Weird, I thought I'd gone through and fixed all of these.  Thanks for fixing it!

Comment 4

5 years ago
https://hg.mozilla.org/mozilla-central/rev/7edaa46a402a
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.