Last Comment Bug 772738 - Avoid "unused variable 'tmp'" warnings for empty CC traverse method implementations
: Avoid "unused variable 'tmp'" warnings for empty CC traverse method implement...
Status: RESOLVED FIXED
[build_warning]
:
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: mozilla16
Assigned To: :Ehsan Akhgari
:
: Nathan Froyd [:froydnj]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-10 21:22 PDT by :Ehsan Akhgari
Modified: 2012-07-12 09:40 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (v1) (817 bytes, patch)
2012-07-10 21:27 PDT, :Ehsan Akhgari
bugs: review+
Details | Diff | Splinter Review

Description :Ehsan Akhgari 2012-07-10 21:22:31 PDT
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.
Comment 1 :Ehsan Akhgari 2012-07-10 21:27:18 PDT
Created attachment 640909 [details] [diff] [review]
Patch (v1)
Comment 3 Andrew McCreight [:mccr8] 2012-07-11 06:41:14 PDT
Weird, I thought I'd gone through and fixed all of these.  Thanks for fixing it!
Comment 4 Ed Morley [:emorley] 2012-07-12 09:40:19 PDT
https://hg.mozilla.org/mozilla-central/rev/7edaa46a402a

Note You need to log in before you can comment on or make changes to this bug.