public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Fabian Groffen" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-arch/p7zip/files/
Date: Thu, 31 May 2018 12:14:06 +0000 (UTC)	[thread overview]
Message-ID: <1527768826.caffb5623f45dfeb423db72bbdbee32b537757e2.grobian@gentoo> (raw)

commit:     caffb5623f45dfeb423db72bbdbee32b537757e2
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu May 31 12:13:46 2018 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> 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 <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);


             reply	other threads:[~2018-05-31 12:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-31 12:14 Fabian Groffen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-08-08 22:43 [gentoo-commits] repo/gentoo:master commit in: app-arch/p7zip/files/ Matt Thode
2016-07-03 11:57 Patrice Clement
2016-04-10  9:49 Lars Wendler
2016-03-28  7:26 Fabian Groffen
2015-12-03 10:44 Justin Lecher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1527768826.caffb5623f45dfeb423db72bbdbee32b537757e2.grobian@gentoo \
    --to=grobian@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox