diff options
| author | Khem Raj <raj.khem@gmail.com> | 2018-04-26 10:00:02 -0700 | 
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2018-05-01 18:17:03 -0700 | 
| commit | f225823e22c720965334f5be613183fa11a612b3 (patch) | |
| tree | 5233e83b13240e76262cb7cb223d6e2d8b497e4e | |
| parent | 378051a7746f8c3675b52b42c76e0f2de556d299 (diff) | |
| download | meta-openembedded-f225823e22c720965334f5be613183fa11a612b3.tar.gz | |
p7zip: Fix build with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
| -rw-r--r-- | meta-oe/recipes-extended/p7zip/files/0001-Fix-narrowing-errors-Wc-11-narrowing.patch | 48 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/p7zip/p7zip_16.02.bb | 6 | 
2 files changed, 52 insertions, 2 deletions
| diff --git a/meta-oe/recipes-extended/p7zip/files/0001-Fix-narrowing-errors-Wc-11-narrowing.patch b/meta-oe/recipes-extended/p7zip/files/0001-Fix-narrowing-errors-Wc-11-narrowing.patch new file mode 100644 index 0000000000..ae27517458 --- /dev/null +++ b/meta-oe/recipes-extended/p7zip/files/0001-Fix-narrowing-errors-Wc-11-narrowing.patch | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | From b6b1782af4aa7f9084d32e4144738dc2535c8d6f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 23 Apr 2018 23:07:21 -0700 | ||
| 4 | Subject: [PATCH] Fix narrowing errors -Wc++11-narrowing | ||
| 5 | |||
| 6 | Clang 6.x finds these errors | ||
| 7 | |||
| 8 | ../../../../CPP/Windows/ErrorMsg.cpp:24:10: error: case value evaluates to -2147024809, which cannot be narrowed to type 'DWORD' (aka 'unsigned int') [-Wc++11-narrowing] | ||
| 9 | case E_INVALIDARG : txt = "E_INVALIDARG"; break ; | ||
| 10 | ^ | ||
| 11 | |||
| 12 | HRESULT causes the macro to be parsed as a signed long, so we need to force it | ||
| 13 | to be checked as an unsigned long instead. | ||
| 14 | |||
| 15 | also reported here https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224930 | ||
| 16 | |||
| 17 | Upstream-Status: Pending | ||
| 18 | |||
| 19 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 20 | --- | ||
| 21 | CPP/Windows/ErrorMsg.cpp | 14 +++++++------- | ||
| 22 | 1 file changed, 7 insertions(+), 7 deletions(-) | ||
| 23 | |||
| 24 | diff --git a/CPP/Windows/ErrorMsg.cpp b/CPP/Windows/ErrorMsg.cpp | ||
| 25 | index 99684ae..78a64ba 100644 | ||
| 26 | --- a/CPP/Windows/ErrorMsg.cpp | ||
| 27 | +++ b/CPP/Windows/ErrorMsg.cpp | ||
| 28 | @@ -15,13 +15,13 @@ UString MyFormatMessage(DWORD errorCode) | ||
| 29 | |||
| 30 | switch(errorCode) { | ||
| 31 | case ERROR_NO_MORE_FILES : txt = "No more files"; break ; | ||
| 32 | - case E_NOTIMPL : txt = "E_NOTIMPL"; break ; | ||
| 33 | - case E_NOINTERFACE : txt = "E_NOINTERFACE"; break ; | ||
| 34 | - case E_ABORT : txt = "E_ABORT"; break ; | ||
| 35 | - case E_FAIL : txt = "E_FAIL"; break ; | ||
| 36 | - case STG_E_INVALIDFUNCTION : txt = "STG_E_INVALIDFUNCTION"; break ; | ||
| 37 | - case E_OUTOFMEMORY : txt = "E_OUTOFMEMORY"; break ; | ||
| 38 | - case E_INVALIDARG : txt = "E_INVALIDARG"; break ; | ||
| 39 | + case (DWORD) E_NOTIMPL : txt = "E_NOTIMPL"; break ; | ||
| 40 | + case (DWORD) E_NOINTERFACE : txt = "E_NOINTERFACE"; break ; | ||
| 41 | + case (DWORD) E_ABORT : txt = "E_ABORT"; break ; | ||
| 42 | + case (DWORD) E_FAIL : txt = "E_FAIL"; break ; | ||
| 43 | + case (DWORD) STG_E_INVALIDFUNCTION : txt = "STG_E_INVALIDFUNCTION"; break ; | ||
| 44 | + case (DWORD) E_OUTOFMEMORY : txt = "E_OUTOFMEMORY"; break ; | ||
| 45 | + case (DWORD) E_INVALIDARG : txt = "E_INVALIDARG"; break ; | ||
| 46 | case ERROR_DIRECTORY : txt = "Error Directory"; break ; | ||
| 47 | default: | ||
| 48 | txt = strerror(errorCode); | ||
| diff --git a/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb b/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb index edf47f7bce..d986da9043 100644 --- a/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb +++ b/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb | |||
| @@ -6,8 +6,10 @@ LIC_FILES_CHKSUM = "file://DOC/copying.txt;md5=4fbd65380cdd255951079008b364516c | |||
| 6 | file://DOC/License.txt;md5=879598edf1f54dddb6930d7581357f8b" | 6 | file://DOC/License.txt;md5=879598edf1f54dddb6930d7581357f8b" | 
| 7 | 7 | ||
| 8 | SRC_URI = "http://downloads.sourceforge.net/p7zip/p7zip/${PV}/p7zip_${PV}_src_all.tar.bz2 \ | 8 | SRC_URI = "http://downloads.sourceforge.net/p7zip/p7zip/${PV}/p7zip_${PV}_src_all.tar.bz2 \ | 
| 9 | file://do_not_override_compiler_and_do_not_strip.patch \ | 9 | file://do_not_override_compiler_and_do_not_strip.patch \ | 
| 10 | file://CVE-2017-17969.patch" | 10 | file://CVE-2017-17969.patch \ | 
| 11 | file://0001-Fix-narrowing-errors-Wc-11-narrowing.patch \ | ||
| 12 | " | ||
| 11 | 13 | ||
| 12 | SRC_URI[md5sum] = "a0128d661cfe7cc8c121e73519c54fbf" | 14 | SRC_URI[md5sum] = "a0128d661cfe7cc8c121e73519c54fbf" | 
| 13 | SRC_URI[sha256sum] = "5eb20ac0e2944f6cb9c2d51dd6c4518941c185347d4089ea89087ffdd6e2341f" | 15 | SRC_URI[sha256sum] = "5eb20ac0e2944f6cb9c2d51dd6c4518941c185347d4089ea89087ffdd6e2341f" | 
