From 4a451e584917ec89fa593068bacd6b46a96e8fb5 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Wed, 28 Oct 2020 02:31:30 -0300 Subject: video_core: Enforce -Werror=type-limits Silences one warning and avoids introducing more in the future. --- src/video_core/CMakeLists.txt | 1 + src/video_core/command_classes/codecs/vp9.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/video_core') diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index fdfc885fc..15bd92f09 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt @@ -303,6 +303,7 @@ else() -Werror=conversion -Wno-error=sign-conversion -Werror=switch + -Werror=type-limits -Werror=unused-variable $<$:-Werror=class-memaccess> diff --git a/src/video_core/command_classes/codecs/vp9.cpp b/src/video_core/command_classes/codecs/vp9.cpp index 3bae0bb5d..c47a0e060 100644 --- a/src/video_core/command_classes/codecs/vp9.cpp +++ b/src/video_core/command_classes/codecs/vp9.cpp @@ -893,7 +893,7 @@ void VpxRangeEncoder::Write(bool bit, s32 probability) { if (((low_value << (offset - 1)) >> 31) != 0) { const s32 current_pos = static_cast(base_stream.GetPosition()); base_stream.Seek(-1, Common::SeekOrigin::FromCurrentPos); - while (base_stream.GetPosition() >= 0 && PeekByte() == 0xff) { + while (PeekByte() == 0xff) { base_stream.WriteByte(0); base_stream.Seek(-2, Common::SeekOrigin::FromCurrentPos); -- cgit v1.2.3