From b1f207303c9f7e07fb20329fc9623a2dabd16506 Mon Sep 17 00:00:00 2001 From: Martchus Date: Mon, 9 Oct 2017 20:59:43 +0200 Subject: [PATCH] Fix warnings in MatroskaContainer --- matroska/matroskacontainer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/matroska/matroskacontainer.cpp b/matroska/matroskacontainer.cpp index faaa1fa..7288f66 100644 --- a/matroska/matroskacontainer.cpp +++ b/matroska/matroskacontainer.cpp @@ -21,6 +21,7 @@ #include #include #include +#include using namespace std; using namespace std::placeholders; @@ -875,7 +876,7 @@ void MatroskaContainer::internalMakeFile() // --> current cue position (determined later) ElementPosition currentCuesPos = ElementPosition::Keep; // -> index of the last segment - unsigned int lastSegmentIndex = static_cast(-1); + unsigned int lastSegmentIndex = numeric_limits::max(); // -> holds new padding uint64 newPadding; // -> whether rewrite is required (always required when forced to rewrite) @@ -1193,7 +1194,7 @@ addCuesElementSize: addNotification(NotificationType::Critical, "Header size of \"Segment\"-element from original file is invalid.", context); throw InvalidDataException(); } - segment.sizeDenotationLength = level0Element->headerSize() - 4; + segment.sizeDenotationLength = static_cast(level0Element->headerSize() - 4u); nonRewriteCalculations: // pretend writing "Cluster"-elements assuming there is no rewrite required