Bug 1592915 - Fix three warnings in `VideoFrameConverter.h` and `TestVideoTrackEncoder.h`. r=pehrsons

This warns because an expression with a side effect is inside a `static_assert` or
`sizeof`.

Differential Revision: https://phabricator.services.mozilla.com/D51243

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Paul Adenot 2019-10-31 12:12:19 +00:00
Родитель 902b013ad7
Коммит f321d6becd
2 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -360,7 +360,10 @@ class VideoFrameConverter {
rtc::scoped_refptr<webrtc::I420Buffer> buffer =
mBufferPool.CreateBuffer(aFrame.mSize.width, aFrame.mSize.height);
if (!buffer) {
MOZ_DIAGNOSTIC_ASSERT(++mFramesDropped <= 100, "Buffers must be leaking");
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
++mFramesDropped;
#endif
MOZ_DIAGNOSTIC_ASSERT(mFramesDropped <= 100, "Buffers must be leaking");
MOZ_LOG(gVideoFrameConverterLog, LogLevel::Warning,
("Creating a buffer failed"));
return;

Просмотреть файл

@ -331,7 +331,8 @@ TEST(VP8VideoTrackEncoder, TimestampFrameEncode)
uint64_t totalDuration = 0;
size_t i = 0;
for (auto& frame : frames) {
EXPECT_EQ(expectedDurations[i++], frame->mDuration);
EXPECT_EQ(expectedDurations[i], frame->mDuration);
i++;
totalDuration += frame->mDuration;
}
const uint64_t pointThree = (PR_USEC_PER_SEC / 10) * 3;
@ -380,7 +381,8 @@ TEST(VP8VideoTrackEncoder, DriftingFrameEncode)
uint64_t totalDuration = 0;
size_t i = 0;
for (auto& frame : frames) {
EXPECT_EQ(expectedDurations[i++], frame->mDuration);
EXPECT_EQ(expectedDurations[i], frame->mDuration);
i++;
totalDuration += frame->mDuration;
}
const uint64_t pointSix = (PR_USEC_PER_SEC / 10) * 6;