Bug 1208353 - Fix -Wshadow warnings in dom/audiochannel. r=padenot
authorChris Peterson <cpeterson@mozilla.com>
Mon, 21 Sep 2015 23:39:00 -0700
changeset 264547 bd4a6ddd01a049ebf846a0e4b5a795596e65508e
parent 264546 66182160cc2889d341d3e9c9e79a35166619f363
child 264548 3d603de6ef4b69d0f20032f4f860951c1f8af797
push id65662
push usercpeterson@mozilla.com
push dateSat, 26 Sep 2015 07:42:42 +0000
treeherdermozilla-inbound@bd4a6ddd01a0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1208353
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1208353 - Fix -Wshadow warnings in dom/audiochannel. r=padenot
dom/audiochannel/AudioChannelService.cpp
dom/audiochannel/moz.build
--- a/dom/audiochannel/AudioChannelService.cpp
+++ b/dom/audiochannel/AudioChannelService.cpp
@@ -354,30 +354,30 @@ AudioChannelService::GetState(nsPIDOMWin
 
     // If there is no parent, or we are the toplevel we don't continue.
   } while (window && window != aWindow);
 }
 
 bool
 AudioChannelService::TelephonyChannelIsActive()
 {
-  nsTObserverArray<nsAutoPtr<AudioChannelWindow>>::ForwardIterator iter(mWindows);
-  while (iter.HasMore()) {
-    AudioChannelWindow* next = iter.GetNext();
+  nsTObserverArray<nsAutoPtr<AudioChannelWindow>>::ForwardIterator windowsIter(mWindows);
+  while (windowsIter.HasMore()) {
+    AudioChannelWindow* next = windowsIter.GetNext();
     if (next->mChannels[(uint32_t)AudioChannel::Telephony].mNumberOfAgents != 0 &&
         !next->mChannels[(uint32_t)AudioChannel::Telephony].mMuted) {
       return true;
     }
   }
 
   if (IsParentProcess()) {
     nsTObserverArray<nsAutoPtr<AudioChannelChildStatus>>::ForwardIterator
-      iter(mPlayingChildren);
-    while (iter.HasMore()) {
-      AudioChannelChildStatus* child = iter.GetNext();
+      childrenIter(mPlayingChildren);
+    while (childrenIter.HasMore()) {
+      AudioChannelChildStatus* child = childrenIter.GetNext();
       if (child->mActiveTelephonyChannel) {
         return true;
       }
     }
   }
 
   return false;
 }
--- a/dom/audiochannel/moz.build
+++ b/dom/audiochannel/moz.build
@@ -19,8 +19,11 @@ EXPORTS += [
 UNIFIED_SOURCES += [
     'AudioChannelAgent.cpp',
     'AudioChannelService.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
+
+if CONFIG['GNU_CXX']:
+    CXXFLAGS += ['-Wshadow']