[MacPorts] #59201: smpeg2: constant expression evaluates to -1 which cannot be narrowed to type 'unsigned int'

MacPorts noreply at macports.org
Mon Oct 7 12:36:40 UTC 2019


#59201: smpeg2: constant expression evaluates to -1 which cannot be narrowed to
type 'unsigned int'
------------------------+----------------------
 Reporter:  ryandesign  |      Owner:  jmroot
     Type:  defect      |     Status:  assigned
 Priority:  Normal      |  Milestone:
Component:  ports       |    Version:  2.6.1
 Keywords:              |       Port:  smpeg2
------------------------+----------------------
 [https://build.macports.org/builders/ports-10.6_i386-builder/builds/1437/steps
 /install-port/logs/stdio smpeg2 doesn't build with clang 8]:

 {{{
 audio/hufftable.cpp:553:8: error: constant expression evaluates to -1
 which cannot be narrowed to type 'unsigned int' [-Wc++11-narrowing]
   { 0, 0-1, 0-1, 0,  0, htd33},
        ^~~
 audio/hufftable.cpp:553:8: note: insert an explicit cast to silence this
 issue
   { 0, 0-1, 0-1, 0,  0, htd33},
        ^~~
        static_cast<unsigned int>( )
 }}}

 This is the same problem I saw with smpeg, which I fixed in
 [cdbb43d3a440b88669276857743ada7a85065a0d/macports-ports] by following
 FreeBSD's lead and setting the language standard back to an earlier
 version that doesn't complain about this, but the same fix does not work
 on smpeg2, because smpeg2 does not honor the CXXFLAGS the port sets. Of
 course this is a problem for other reasons too, like not using the
 specified C++ standard library.

 The smpeg port has many patches which fix the build system to honor our
 flags. The smpeg2 port seems to be missing these.

-- 
Ticket URL: <https://trac.macports.org/ticket/59201>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list