diff options
Diffstat (limited to 'recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch')
-rw-r--r-- | recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch b/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch new file mode 100644 index 00000000..a216566c --- /dev/null +++ b/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 88fa048e22ad00b04054b8a64df53bd440e01537 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 11 Aug 2017 17:29:02 -0700 | ||
4 | Subject: [PATCH 2/9] typecast index from size_t to int | ||
5 | |||
6 | size_t is not consistent across architectures e.g. on arm its unsigned int | ||
7 | |||
8 | Fixes | ||
9 | error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | Upstream-Status: Pending | ||
14 | |||
15 | codecparsers/jpegParser.cpp | 4 ++-- | ||
16 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/codecparsers/jpegParser.cpp b/codecparsers/jpegParser.cpp | ||
19 | index 2217028..6da5c36 100644 | ||
20 | --- a/codecparsers/jpegParser.cpp | ||
21 | +++ b/codecparsers/jpegParser.cpp | ||
22 | @@ -639,7 +639,7 @@ bool Parser::parseDAC() | ||
23 | |||
24 | length -= 2; | ||
25 | |||
26 | - if (index < 0 || index >= (2 * NUM_ARITH_TBLS)) { | ||
27 | + if ((int)index < 0 || index >= (2 * NUM_ARITH_TBLS)) { | ||
28 | ERROR("Invalid DAC Index"); | ||
29 | return false; | ||
30 | } | ||
31 | @@ -747,7 +747,7 @@ bool Parser::parseDHT() | ||
32 | huffTables = &m_dcHuffTables; | ||
33 | } | ||
34 | |||
35 | - if (index < 0 || index >= NUM_HUFF_TBLS) { | ||
36 | + if ((int)index < 0 || index >= NUM_HUFF_TBLS) { | ||
37 | ERROR("Bad Huff Table Index"); | ||
38 | return false; | ||
39 | } | ||
40 | -- | ||
41 | 2.14.1 | ||
42 | |||