diff options
| author | Khem Raj <raj.khem@gmail.com> | 2017-08-14 22:27:03 -0700 |
|---|---|---|
| committer | Saul Wold <sgw@linux.intel.com> | 2017-08-15 14:03:06 -0700 |
| commit | c0b5e0f3056a166bfcfe4e80611358d8d89280e7 (patch) | |
| tree | 63d17f4fce0ba80b8a45ac7ca99ae6e3334c181d | |
| parent | 974fedf70ae759ced4ed8918ea8a9147329efff8 (diff) | |
| download | meta-intel-c0b5e0f3056a166bfcfe4e80611358d8d89280e7.tar.gz | |
libyami-utils: Fix build with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
| -rw-r--r-- | common/recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch | 99 | ||||
| -rw-r--r-- | common/recipes-multimedia/libyami/libyami-utils_1.2.0.bb | 4 |
2 files changed, 102 insertions, 1 deletions
diff --git a/common/recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch b/common/recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch new file mode 100644 index 00000000..a4a4029c --- /dev/null +++ b/common/recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch | |||
| @@ -0,0 +1,99 @@ | |||
| 1 | From b7e66182788cd925570bb4c310e21fbcd3185040 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 12 Aug 2017 08:49:20 -0700 | ||
| 4 | Subject: [PATCH] Fix build with clang | ||
| 5 | |||
| 6 | Fix errors e.g. | ||
| 7 | error: comparison of constant -1 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare]error: comparison of constant -1 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare] | ||
| 8 | |||
| 9 | and | ||
| 10 | |||
| 11 | psnr.cpp:225:17: error: bool literal returned from 'main' [-Werror,-Wmain] | ||
| 12 | |||
| 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 14 | --- | ||
| 15 | Upstream-Status: Pending | ||
| 16 | |||
| 17 | tests/decodehelp.cpp | 2 +- | ||
| 18 | tests/encodehelp.h | 2 +- | ||
| 19 | tests/vpp.cpp | 2 +- | ||
| 20 | tests/yamitranscode.cpp | 2 +- | ||
| 21 | testscripts/psnr.cpp | 4 ++-- | ||
| 22 | 5 files changed, 6 insertions(+), 6 deletions(-) | ||
| 23 | |||
| 24 | diff --git a/tests/decodehelp.cpp b/tests/decodehelp.cpp | ||
| 25 | index a69eab6..2d96598 100644 | ||
| 26 | --- a/tests/decodehelp.cpp | ||
| 27 | +++ b/tests/decodehelp.cpp | ||
| 28 | @@ -70,7 +70,7 @@ bool processCmdLine(int argc, char** argv, DecodeParameter* parameters) | ||
| 29 | {"capi", no_argument, NULL, 0}, | ||
| 30 | {NULL, no_argument, NULL, 0}}; | ||
| 31 | |||
| 32 | - char opt; | ||
| 33 | + int opt; | ||
| 34 | while ((opt = getopt_long_only(argc, argv, "h:m:n:i:f:o:w:?", long_opts,&option_index)) != -1){ | ||
| 35 | switch (opt) { | ||
| 36 | case 'h': | ||
| 37 | diff --git a/tests/encodehelp.h b/tests/encodehelp.h | ||
| 38 | index 57ccd77..76df801 100644 | ||
| 39 | --- a/tests/encodehelp.h | ||
| 40 | +++ b/tests/encodehelp.h | ||
| 41 | @@ -107,7 +107,7 @@ static VideoRateControl string_to_rc_mode(char *str) | ||
| 42 | |||
| 43 | static bool process_cmdline(int argc, char *argv[]) | ||
| 44 | { | ||
| 45 | - char opt; | ||
| 46 | + int opt; | ||
| 47 | const struct option long_opts[] = { | ||
| 48 | { "help", no_argument, NULL, 'h' }, | ||
| 49 | { "qp", required_argument, NULL, 0 }, | ||
| 50 | diff --git a/tests/vpp.cpp b/tests/vpp.cpp | ||
| 51 | index 5a60c0a..52da43b 100644 | ||
| 52 | --- a/tests/vpp.cpp | ||
| 53 | +++ b/tests/vpp.cpp | ||
| 54 | @@ -151,7 +151,7 @@ public: | ||
| 55 | private: | ||
| 56 | bool processCmdLine(int argc, char* argv[]) | ||
| 57 | { | ||
| 58 | - char opt; | ||
| 59 | + int opt; | ||
| 60 | const struct option long_opts[] = { | ||
| 61 | { "help", no_argument, NULL, 'h' }, | ||
| 62 | { "sharpening", required_argument, NULL, 's' }, | ||
| 63 | diff --git a/tests/yamitranscode.cpp b/tests/yamitranscode.cpp | ||
| 64 | index 4cb72aa..2fc6725 100755 | ||
| 65 | --- a/tests/yamitranscode.cpp | ||
| 66 | +++ b/tests/yamitranscode.cpp | ||
| 67 | @@ -95,7 +95,7 @@ static VideoRateControl string_to_rc_mode(char *str) | ||
| 68 | |||
| 69 | static bool processCmdLine(int argc, char *argv[], TranscodeParams& para) | ||
| 70 | { | ||
| 71 | - char opt; | ||
| 72 | + int opt; | ||
| 73 | const struct option long_opts[] = { | ||
| 74 | { "help", no_argument, NULL, 'h' }, | ||
| 75 | { "qp", required_argument, NULL, 0 }, | ||
| 76 | diff --git a/testscripts/psnr.cpp b/testscripts/psnr.cpp | ||
| 77 | index 5cc24c9..68bd668 100644 | ||
| 78 | --- a/testscripts/psnr.cpp | ||
| 79 | +++ b/testscripts/psnr.cpp | ||
| 80 | @@ -215,14 +215,14 @@ int main(int argc, char *argv[]) | ||
| 81 | const char* psnrresult = "average_psnr.txt"; | ||
| 82 | int width=0,height=0; | ||
| 83 | int standardpsnr = NORMAL_PSNR; | ||
| 84 | - char opt; | ||
| 85 | + int opt; | ||
| 86 | while ((opt = getopt(argc, argv, "h:W:H:i:o:s:?")) != -1) | ||
| 87 | { | ||
| 88 | switch (opt) { | ||
| 89 | case 'h': | ||
| 90 | case '?': | ||
| 91 | print_help(argv[0]); | ||
| 92 | - return false; | ||
| 93 | + return -1; | ||
| 94 | case 'i': | ||
| 95 | filename1 = optarg; | ||
| 96 | break; | ||
| 97 | -- | ||
| 98 | 2.14.1 | ||
| 99 | |||
diff --git a/common/recipes-multimedia/libyami/libyami-utils_1.2.0.bb b/common/recipes-multimedia/libyami/libyami-utils_1.2.0.bb index 0cda6685..672b8989 100644 --- a/common/recipes-multimedia/libyami/libyami-utils_1.2.0.bb +++ b/common/recipes-multimedia/libyami/libyami-utils_1.2.0.bb | |||
| @@ -7,7 +7,9 @@ BUGTRACKER = "https://github.com/01org/libyami-utils/issues/new" | |||
| 7 | LICENSE = "Apache-2.0" | 7 | LICENSE = "Apache-2.0" |
| 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" | 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" |
| 9 | 9 | ||
| 10 | SRC_URI = "https://github.com/01org/libyami-utils/archive/${PV}.tar.gz;downloadfilename=${BP}.tar.gz" | 10 | SRC_URI = "https://github.com/01org/libyami-utils/archive/${PV}.tar.gz;downloadfilename=${BP}.tar.gz \ |
| 11 | file://0001-Fix-build-with-clang.patch \ | ||
| 12 | " | ||
| 11 | SRC_URI[md5sum] = "b4637f1a384e3de20076bf01ca2515d3" | 13 | SRC_URI[md5sum] = "b4637f1a384e3de20076bf01ca2515d3" |
| 12 | SRC_URI[sha256sum] = "3dbaedc797bf2d0e03879bfdbea462c3ec2aac89b49c1ed55cbff1be2590d1e8" | 14 | SRC_URI[sha256sum] = "3dbaedc797bf2d0e03879bfdbea462c3ec2aac89b49c1ed55cbff1be2590d1e8" |
| 13 | 15 | ||
