From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B6A27138330 for ; Thu, 31 May 2018 12:14:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B1865E0849; Thu, 31 May 2018 12:14:10 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 263A1E0849 for ; Thu, 31 May 2018 12:14:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8BF92335C63 for ; Thu, 31 May 2018 12:14:08 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CF608287 for ; Thu, 31 May 2018 12:14:06 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1527768826.caffb5623f45dfeb423db72bbdbee32b537757e2.grobian@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-arch/p7zip/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-arch/p7zip/files/p7zip-16.02-darwin.patch X-VCS-Directories: app-arch/p7zip/files/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: caffb5623f45dfeb423db72bbdbee32b537757e2 X-VCS-Branch: master Date: Thu, 31 May 2018 12:14:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f6203cb1-6c1a-475a-b676-2639247011c2 X-Archives-Hash: 2785e6718b318ec13c6af811d19a69f7 commit: caffb5623f45dfeb423db72bbdbee32b537757e2 Author: Fabian Groffen gentoo org> AuthorDate: Thu May 31 12:13:46 2018 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Thu May 31 12:13:46 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=caffb562 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 app-arch/p7zip/files/p7zip-16.02-darwin.patch | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/app-arch/p7zip/files/p7zip-16.02-darwin.patch b/app-arch/p7zip/files/p7zip-16.02-darwin.patch index 1ee5d3434b9..1c3899f30a5 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 #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);