Bug 1499615 - Silence unused returned value warning and initialize the counter. r=pehrsons
authorAlex Chronopoulos <achronop@gmail.com>
Thu, 18 Oct 2018 11:24:36 +0000
changeset 490299 cf707f5b0477c1537f411d1f776ad10303f2ccd2
parent 490298 6e0c72599e0b63fe2e4957184c40520c2fa6339c
child 490300 3e2d47ca7a2a199ab58bf0b7605882a205e6cece
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewerspehrsons
bugs1499615
milestone64.0a1
Bug 1499615 - Silence unused returned value warning and initialize the counter. r=pehrsons Differential Revision: https://phabricator.services.mozilla.com/D8964
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -2710,17 +2710,18 @@ MediaDecoderStateMachine::MediaDecoderSt
   INIT_MIRROR(mPlayState, MediaDecoder::PLAY_STATE_LOADING),
   INIT_MIRROR(mVolume, 1.0),
   INIT_MIRROR(mPreservesPitch, true),
   INIT_MIRROR(mLooping, false),
   INIT_MIRROR(mSameOriginMedia, false),
   INIT_MIRROR(mMediaPrincipalHandle, PRINCIPAL_HANDLE_NONE),
   INIT_CANONICAL(mDuration, NullableTimeUnit()),
   INIT_CANONICAL(mCurrentPosition, TimeUnit::Zero()),
-  INIT_CANONICAL(mIsAudioDataAudible, false)
+  INIT_CANONICAL(mIsAudioDataAudible, false),
+  mSetSinkRequestsCount(0)
 {
   MOZ_COUNT_CTOR(MediaDecoderStateMachine);
   NS_ASSERTION(NS_IsMainThread(), "Should be on main thread.");
 
   InitVideoQueuePrefs();
 
   DDLINKCHILD("reader", aReader);
 }
@@ -3669,17 +3670,17 @@ MediaDecoderStateMachine::LoopingChanged
 }
 
 RefPtr<GenericPromise>
 MediaDecoderStateMachine::InvokeSetSink(RefPtr<AudioDeviceInfo> aSink)
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aSink);
 
-  ++mSetSinkRequestsCount;
+  Unused << ++mSetSinkRequestsCount;
   return InvokeAsync(
            OwnerThread(), this, __func__,
            &MediaDecoderStateMachine::SetSink, aSink);
 }
 
 RefPtr<GenericPromise>
 MediaDecoderStateMachine::SetSink(RefPtr<AudioDeviceInfo> aSink)
 {