<pre style='margin:0'>
Ken (kencu) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/59f8ee7b083ec68c4bc67d2aa568b68e7def09c8">https://github.com/macports/macports-ports/commit/59f8ee7b083ec68c4bc67d2aa568b68e7def09c8</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 59f8ee7 p7zip: fix build with newer clang compilers
</span>59f8ee7 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 59f8ee7b083ec68c4bc67d2aa568b68e7def09c8
</span>Author: Ken Cunningham <kencu@macports.org>
AuthorDate: Sat May 16 14:49:15 2020 -0700
<span style='display:block; white-space:pre;color:#404040;'> p7zip: fix build with newer clang compilers
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> newer LLVM clang compilers throw an error on the
</span><span style='display:block; white-space:pre;color:#404040;'> illegal narrowing in ErrorMsg.cpp. Xcode clangs
</span><span style='display:block; white-space:pre;color:#404040;'> up to Xcode 11 seem to accept this.
</span>---
archivers/p7zip/Portfile | 3 +-
.../files/patch-ErrorMsg-illegal-narrowing.diff | 33 ++++++++++++++++++++++
2 files changed, 35 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/archivers/p7zip/Portfile b/archivers/p7zip/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index e7f1b50..8c128e9 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/archivers/p7zip/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/archivers/p7zip/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -31,7 +31,8 @@ variant universal {}
</span> patchfiles patch-CVE-2016-9296.diff \
patch-CVE-2017-17969.diff \
patch-CVE-2018-5996.diff \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-CVE-2018-10115.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-CVE-2018-10115.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-ErrorMsg-illegal-narrowing.diff
</span>
# add the selected -stdlib to clang builds
# see https://trac.macports.org/ticket/56811
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/archivers/p7zip/files/patch-ErrorMsg-illegal-narrowing.diff b/archivers/p7zip/files/patch-ErrorMsg-illegal-narrowing.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..59dc53f
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/archivers/p7zip/files/patch-ErrorMsg-illegal-narrowing.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,33 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+This fixes the build with Clang 6.0:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ../../../../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]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case E_INVALIDARG : txt = "E_INVALIDARG"; break ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ^
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ../../../../CPP/Common/MyWindows.h:89:22: note: expanded from macro 'E_INVALIDARG'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define E_INVALIDARG ((HRESULT)0x80070057L)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ^
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+The HRESULT cast in the macro causes the value to be read as signed int.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- CPP/Windows/ErrorMsg.cpp.orig 2015-01-18 18:20:28 UTC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ CPP/Windows/ErrorMsg.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -15,13 +15,13 @@ UString MyFormatMessage(DWORD errorCode)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ switch(errorCode) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case ERROR_NO_MORE_FILES : txt = "No more files"; break ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case E_NOTIMPL : txt = "E_NOTIMPL"; break ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case E_NOINTERFACE : txt = "E_NOINTERFACE"; break ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case E_ABORT : txt = "E_ABORT"; break ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case E_FAIL : txt = "E_FAIL"; break ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case STG_E_INVALIDFUNCTION : txt = "STG_E_INVALIDFUNCTION"; break ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case E_OUTOFMEMORY : txt = "E_OUTOFMEMORY"; break ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- case E_INVALIDARG : txt = "E_INVALIDARG"; break ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case (DWORD)(E_NOTIMPL) : txt = "E_NOTIMPL"; break ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case (DWORD)(E_NOINTERFACE) : txt = "E_NOINTERFACE"; break ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case (DWORD)(E_ABORT) : txt = "E_ABORT"; break ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case (DWORD)(E_FAIL) : txt = "E_FAIL"; break ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case (DWORD)(STG_E_INVALIDFUNCTION) : txt = "STG_E_INVALIDFUNCTION"; break ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case (DWORD)(E_OUTOFMEMORY) : txt = "E_OUTOFMEMORY"; break ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case (DWORD)(E_INVALIDARG) : txt = "E_INVALIDARG"; break ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case ERROR_DIRECTORY : txt = "Error Directory"; break ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ txt = strerror(errorCode);
</span>\ No newline at end of file
</pre><pre style='margin:0'>
</pre>