From 75e31097d90b83dae81181670d48bc896c4c1360 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 14 Aug 2017 22:27:02 -0700 Subject: libyami: Fix build with musl/clang These patches are interesting from upstreaming point of view as well Signed-off-by: Khem Raj Signed-off-by: Saul Wold --- .../0002-typecast-index-from-size_t-to-int.patch | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 common/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch (limited to 'common/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch') diff --git a/common/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch b/common/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch new file mode 100644 index 00000000..a216566c --- /dev/null +++ b/common/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch @@ -0,0 +1,42 @@ +From 88fa048e22ad00b04054b8a64df53bd440e01537 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 11 Aug 2017 17:29:02 -0700 +Subject: [PATCH 2/9] typecast index from size_t to int + +size_t is not consistent across architectures e.g. on arm its unsigned int + +Fixes +error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] + +Signed-off-by: Khem Raj +--- +Upstream-Status: Pending + + codecparsers/jpegParser.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/codecparsers/jpegParser.cpp b/codecparsers/jpegParser.cpp +index 2217028..6da5c36 100644 +--- a/codecparsers/jpegParser.cpp ++++ b/codecparsers/jpegParser.cpp +@@ -639,7 +639,7 @@ bool Parser::parseDAC() + + length -= 2; + +- if (index < 0 || index >= (2 * NUM_ARITH_TBLS)) { ++ if ((int)index < 0 || index >= (2 * NUM_ARITH_TBLS)) { + ERROR("Invalid DAC Index"); + return false; + } +@@ -747,7 +747,7 @@ bool Parser::parseDHT() + huffTables = &m_dcHuffTables; + } + +- if (index < 0 || index >= NUM_HUFF_TBLS) { ++ if ((int)index < 0 || index >= NUM_HUFF_TBLS) { + ERROR("Bad Huff Table Index"); + return false; + } +-- +2.14.1 + -- cgit v1.2.3-54-g00ecf