summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2020-10-28 02:31:30 -0300
committerGravatar ReinUsesLisp2020-10-28 02:37:47 -0300
commit4a451e584917ec89fa593068bacd6b46a96e8fb5 (patch)
tree14e37da4cdc8aa980d665ab4d33a6208c3f12bc1 /src
parentMerge pull request #4842 from liushuyu/fix-web-srv (diff)
downloadyuzu-4a451e584917ec89fa593068bacd6b46a96e8fb5.tar.gz
yuzu-4a451e584917ec89fa593068bacd6b46a96e8fb5.tar.xz
yuzu-4a451e584917ec89fa593068bacd6b46a96e8fb5.zip
video_core: Enforce -Werror=type-limits
Silences one warning and avoids introducing more in the future.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/CMakeLists.txt1
-rw-r--r--src/video_core/command_classes/codecs/vp9.cpp2
2 files changed, 2 insertions, 1 deletions
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()
303 -Werror=conversion 303 -Werror=conversion
304 -Wno-error=sign-conversion 304 -Wno-error=sign-conversion
305 -Werror=switch 305 -Werror=switch
306 -Werror=type-limits
306 -Werror=unused-variable 307 -Werror=unused-variable
307 308
308 $<$<CXX_COMPILER_ID:GNU>:-Werror=class-memaccess> 309 $<$<CXX_COMPILER_ID:GNU>:-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) {
893 if (((low_value << (offset - 1)) >> 31) != 0) { 893 if (((low_value << (offset - 1)) >> 31) != 0) {
894 const s32 current_pos = static_cast<s32>(base_stream.GetPosition()); 894 const s32 current_pos = static_cast<s32>(base_stream.GetPosition());
895 base_stream.Seek(-1, Common::SeekOrigin::FromCurrentPos); 895 base_stream.Seek(-1, Common::SeekOrigin::FromCurrentPos);
896 while (base_stream.GetPosition() >= 0 && PeekByte() == 0xff) { 896 while (PeekByte() == 0xff) {
897 base_stream.WriteByte(0); 897 base_stream.WriteByte(0);
898 898
899 base_stream.Seek(-2, Common::SeekOrigin::FromCurrentPos); 899 base_stream.Seek(-2, Common::SeekOrigin::FromCurrentPos);