summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar LC2020-10-28 03:16:10 -0400
committerGravatar GitHub2020-10-28 03:16:10 -0400
commit978e7897a3099178d94d3ab1b9ae4aff3a5bb2cd (patch)
treec74c7817c019da45060306b862c1a42e3f6249ec
parentMerge pull request #4847 from ReinUsesLisp/warn-move (diff)
parentvideo_core: Enforce -Werror=type-limits (diff)
downloadyuzu-978e7897a3099178d94d3ab1b9ae4aff3a5bb2cd.tar.gz
yuzu-978e7897a3099178d94d3ab1b9ae4aff3a5bb2cd.tar.xz
yuzu-978e7897a3099178d94d3ab1b9ae4aff3a5bb2cd.zip
Merge pull request #4848 from ReinUsesLisp/type-limits
video_core: Enforce -Werror=type-limits
Diffstat (limited to '')
-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 567084241..abcee2a1c 100644
--- a/src/video_core/CMakeLists.txt
+++ b/src/video_core/CMakeLists.txt
@@ -305,6 +305,7 @@ else()
305 -Werror=pessimizing-move 305 -Werror=pessimizing-move
306 -Werror=redundant-move 306 -Werror=redundant-move
307 -Werror=switch 307 -Werror=switch
308 -Werror=type-limits
308 -Werror=unused-variable 309 -Werror=unused-variable
309 310
310 $<$<CXX_COMPILER_ID:GNU>:-Werror=class-memaccess> 311 $<$<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 747c63d85..d205a8f5d 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);