Bug 1743834 - Fix static-analysis warning. r=alwu
authorPaul Adenot <paul@paul.cx>
Tue, 24 May 2022 13:09:08 +0000
changeset 618732 0daef4d3e9ece931791f1121e27d8530a277d422
parent 618731 e466266339beeacbfca6c8c781dcdc02699cac03
child 618733 55b1957af2162f94d1dcfbf882da7d7b9499ca19
push id163385
push userpadenot@mozilla.com
push dateTue, 24 May 2022 13:12:53 +0000
treeherderautoland@3774e6ab3869 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersalwu
bugs1743834
milestone102.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 1743834 - Fix static-analysis warning. r=alwu Differential Revision: https://phabricator.services.mozilla.com/D141991
dom/media/mediasink/AudioSink.cpp
--- a/dom/media/mediasink/AudioSink.cpp
+++ b/dom/media/mediasink/AudioSink.cpp
@@ -337,17 +337,18 @@ uint32_t AudioSink::SampleToFrame(uint32
   return aSamples / mOutputChannels;
 }
 
 void AudioSink::NotifyAudioNeeded() {
   MOZ_ASSERT(mOwnerThread->IsCurrentThreadIn(),
              "Not called from the owner's thread");
 
   while (mAudioQueue.GetSize() &&
-         AudioQueuedInRingBufferMS() < mProcessedQueueThresholdMS) {
+         AudioQueuedInRingBufferMS() <
+             static_cast<uint32_t>(mProcessedQueueThresholdMS)) {
     // Check if there's room in our ring buffer.
     if (mAudioQueue.PeekFront()->Frames() >
         SampleToFrame(mProcessedSPSCQueue->AvailableWrite())) {
       SINK_LOG_V("Can't push %u frames. In ringbuffer %u / %u\n",
                  mAudioQueue.PeekFront()->Frames(),
                  SampleToFrame(mProcessedSPSCQueue->AvailableRead()),
                  SampleToFrame(mProcessedSPSCQueue->Capacity()));
       return;