Summary: | archivers/p7zip: fails to build with clang 6.0 (blocks 49 ports) | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Jan Beich <jbeich> |
Component: | Individual Port(s) | Assignee: | Raphael Kubo da Costa <rakuco> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | Flags: | rakuco:
maintainer-feedback+
|
Priority: | --- | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any | ||
Bug Depends on: | |||
Bug Blocks: | 224669 |
Description
Jan Beich
![]() GCC 6+ doesn't complain. Maybe try the following: USES+= compiler CXXFLAGS+= ${CXXFLAGS_${CHOSEN_COMPILER_TYPE}} CXXFLAGS_clang= -Wno-error=narrowing A commit references this bug: Author: rakuco Date: Fri Jan 5 21:45:14 UTC 2018 New revision: 458172 URL: https://svnweb.freebsd.org/changeset/ports/458172 Log: Add a patch to fix 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) ^ HRESULT causes the macro to be parsed as a signed long, so we need to force it to be checked as an unsigned long instead. PR: 224930 Changes: head/archivers/p7zip/files/patch-CPP_Windows_ErrorMsg.cpp |