Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-arch/p7zip/files/
Date: Thu, 31 May 2018 12:14:11
Message-Id: 1527768826.caffb5623f45dfeb423db72bbdbee32b537757e2.grobian@gentoo
1 commit: caffb5623f45dfeb423db72bbdbee32b537757e2
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 31 12:13:46 2018 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Thu May 31 12:13:46 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=caffb562
7
8 app-arch/p7zip: include patch for >=clang-6, bug #655386
9
10 Closes: https://bugs.gentoo.org/655386
11 Package-Manager: Portage-2.3.24, Repoman-2.3.6
12
13 app-arch/p7zip/files/p7zip-16.02-darwin.patch | 35 +++++++++++++++++++++++++++
14 1 file changed, 35 insertions(+)
15
16 diff --git a/app-arch/p7zip/files/p7zip-16.02-darwin.patch b/app-arch/p7zip/files/p7zip-16.02-darwin.patch
17 index 1ee5d3434b9..1c3899f30a5 100644
18 --- a/app-arch/p7zip/files/p7zip-16.02-darwin.patch
19 +++ b/app-arch/p7zip/files/p7zip-16.02-darwin.patch
20 @@ -9,3 +9,38 @@
21 #include <sys/types.h>
22 #endif
23
24 +
25 +https://svnweb.freebsd.org/ports/head/archivers/p7zip/files/patch-CPP_Windows_ErrorMsg.cpp?view=markup&pathrev=458172
26 +This fixes the build with Clang 6.0:
27 +
28 + ../../../../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]
29 + case E_INVALIDARG : txt = "E_INVALIDARG"; break ;
30 + ^
31 + ../../../../CPP/Common/MyWindows.h:89:22: note: expanded from macro 'E_INVALIDARG'
32 + #define E_INVALIDARG ((HRESULT)0x80070057L)
33 + ^
34 +
35 +The HRESULT cast in the macro causes the value to be read as signed int.
36 +--- a/CPP/Windows/ErrorMsg.cpp
37 ++++ b/CPP/Windows/ErrorMsg.cpp
38 +@@ -15,13 +15,13 @@ UString MyFormatMessage(DWORD errorCode)
39 +
40 + switch(errorCode) {
41 + case ERROR_NO_MORE_FILES : txt = "No more files"; break ;
42 +- case E_NOTIMPL : txt = "E_NOTIMPL"; break ;
43 +- case E_NOINTERFACE : txt = "E_NOINTERFACE"; break ;
44 +- case E_ABORT : txt = "E_ABORT"; break ;
45 +- case E_FAIL : txt = "E_FAIL"; break ;
46 +- case STG_E_INVALIDFUNCTION : txt = "STG_E_INVALIDFUNCTION"; break ;
47 +- case E_OUTOFMEMORY : txt = "E_OUTOFMEMORY"; break ;
48 +- case E_INVALIDARG : txt = "E_INVALIDARG"; break ;
49 ++ case (DWORD)(E_NOTIMPL) : txt = "E_NOTIMPL"; break ;
50 ++ case (DWORD)(E_NOINTERFACE) : txt = "E_NOINTERFACE"; break ;
51 ++ case (DWORD)(E_ABORT) : txt = "E_ABORT"; break ;
52 ++ case (DWORD)(E_FAIL) : txt = "E_FAIL"; break ;
53 ++ case (DWORD)(STG_E_INVALIDFUNCTION) : txt = "STG_E_INVALIDFUNCTION"; break ;
54 ++ case (DWORD)(E_OUTOFMEMORY) : txt = "E_OUTOFMEMORY"; break ;
55 ++ case (DWORD)(E_INVALIDARG) : txt = "E_INVALIDARG"; break ;
56 + case ERROR_DIRECTORY : txt = "Error Directory"; break ;
57 + default:
58 + txt = strerror(errorCode);