summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2018-05-31 14:13:46 +0200
committerFabian Groffen <grobian@gentoo.org>2018-05-31 14:13:46 +0200
commitcaffb5623f45dfeb423db72bbdbee32b537757e2 (patch)
treebbd975566d2f983be90a7b08faf1643ce3724201 /app-arch
parentapp-admin/monit: Revbump to install bash-completion file. Removed old (diff)
downloadgentoo-caffb5623f45dfeb423db72bbdbee32b537757e2.tar.gz
gentoo-caffb5623f45dfeb423db72bbdbee32b537757e2.tar.bz2
gentoo-caffb5623f45dfeb423db72bbdbee32b537757e2.zip
app-arch/p7zip: include patch for >=clang-6, bug #655386
Closes: https://bugs.gentoo.org/655386 Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'app-arch')
-rw-r--r--app-arch/p7zip/files/p7zip-16.02-darwin.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/app-arch/p7zip/files/p7zip-16.02-darwin.patch b/app-arch/p7zip/files/p7zip-16.02-darwin.patch
index 1ee5d3434b9f..1c3899f30a53 100644
--- a/app-arch/p7zip/files/p7zip-16.02-darwin.patch
+++ b/app-arch/p7zip/files/p7zip-16.02-darwin.patch
@@ -9,3 +9,38 @@
#include <sys/types.h>
#endif
+
+https://svnweb.freebsd.org/ports/head/archivers/p7zip/files/patch-CPP_Windows_ErrorMsg.cpp?view=markup&pathrev=458172
+This fixes the build with Clang 6.0:
+
+ ../../../../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]
+ case E_INVALIDARG : txt = "E_INVALIDARG"; break ;
+ ^
+ ../../../../CPP/Common/MyWindows.h:89:22: note: expanded from macro 'E_INVALIDARG'
+ #define E_INVALIDARG ((HRESULT)0x80070057L)
+ ^
+
+The HRESULT cast in the macro causes the value to be read as signed int.
+--- a/CPP/Windows/ErrorMsg.cpp
++++ b/CPP/Windows/ErrorMsg.cpp
+@@ -15,13 +15,13 @@ UString MyFormatMessage(DWORD errorCode)
+
+ switch(errorCode) {
+ case ERROR_NO_MORE_FILES : txt = "No more files"; break ;
+- case E_NOTIMPL : txt = "E_NOTIMPL"; break ;
+- case E_NOINTERFACE : txt = "E_NOINTERFACE"; break ;
+- case E_ABORT : txt = "E_ABORT"; break ;
+- case E_FAIL : txt = "E_FAIL"; break ;
+- case STG_E_INVALIDFUNCTION : txt = "STG_E_INVALIDFUNCTION"; break ;
+- case E_OUTOFMEMORY : txt = "E_OUTOFMEMORY"; break ;
+- case E_INVALIDARG : txt = "E_INVALIDARG"; break ;
++ case (DWORD)(E_NOTIMPL) : txt = "E_NOTIMPL"; break ;
++ case (DWORD)(E_NOINTERFACE) : txt = "E_NOINTERFACE"; break ;
++ case (DWORD)(E_ABORT) : txt = "E_ABORT"; break ;
++ case (DWORD)(E_FAIL) : txt = "E_FAIL"; break ;
++ case (DWORD)(STG_E_INVALIDFUNCTION) : txt = "STG_E_INVALIDFUNCTION"; break ;
++ case (DWORD)(E_OUTOFMEMORY) : txt = "E_OUTOFMEMORY"; break ;
++ case (DWORD)(E_INVALIDARG) : txt = "E_INVALIDARG"; break ;
+ case ERROR_DIRECTORY : txt = "Error Directory"; break ;
+ default:
+ txt = strerror(errorCode);