Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jan 2018 11:56:54 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r458130 - head/multimedia/smpeg
Message-ID:  <201801051156.w05Bus8n052453@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Fri Jan  5 11:56:53 2018
New Revision: 458130
URL: https://svnweb.freebsd.org/changeset/ports/458130

Log:
  multimedia/smpeg: unbreak build with Clang 6 (C++14 by default)
  
  huffmantable.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},
         ^~~
  huffmantable.cpp:553:8: note: insert an explicit cast to silence this issue
    { 0, 0-1, 0-1, 0,  0, htd33},
         ^~~
         static_cast<unsigned int>( )
  huffmantable.cpp:553:13: 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},
              ^~~
  huffmantable.cpp:553:13: note: insert an explicit cast to silence this issue
    { 0, 0-1, 0-1, 0,  0, htd33},
              ^~~
              static_cast<unsigned int>( )
  huffmantable.cpp:557:8: error: constant expression evaluates to -1 which cannot be narrowed to type
        'unsigned int' [-Wc++11-narrowing]
    { 4, 0-1, 0-1, 0,  0, htd33},
         ^~~
  huffmantable.cpp:557:8: note: insert an explicit cast to silence this issue
    { 4, 0-1, 0-1, 0,  0, htd33},
         ^~~
         static_cast<unsigned int>( )
  huffmantable.cpp:557:13: error: constant expression evaluates to -1 which cannot be narrowed to type
        'unsigned int' [-Wc++11-narrowing]
    { 4, 0-1, 0-1, 0,  0, htd33},
              ^~~
  huffmantable.cpp:557:13: note: insert an explicit cast to silence this issue
    { 4, 0-1, 0-1, 0,  0, htd33},
              ^~~
              static_cast<unsigned int>( )
  huffmantable.cpp:567:8: error: constant expression evaluates to -1 which cannot be narrowed to type
        'unsigned int' [-Wc++11-narrowing]
    {14, 0-1, 0-1, 0,  0, htd33},
         ^~~
  huffmantable.cpp:567:8: note: insert an explicit cast to silence this issue
    {14, 0-1, 0-1, 0,  0, htd33},
         ^~~
         static_cast<unsigned int>( )
  huffmantable.cpp:567:13: error: constant expression evaluates to -1 which cannot be narrowed to type
        'unsigned int' [-Wc++11-narrowing]
    {14, 0-1, 0-1, 0,  0, htd33},
              ^~~
  huffmantable.cpp:567:13: note: insert an explicit cast to silence this issue
    {14, 0-1, 0-1, 0,  0, htd33},
              ^~~
              static_cast<unsigned int>( )
  
  Reported by:	antoine (via bug 224669)
  Obtained from:	Arch Linux

Modified:
  head/multimedia/smpeg/Makefile   (contents, props changed)

Modified: head/multimedia/smpeg/Makefile
==============================================================================
--- head/multimedia/smpeg/Makefile	Fri Jan  5 11:23:51 2018	(r458129)
+++ head/multimedia/smpeg/Makefile	Fri Jan  5 11:56:53 2018	(r458130)
@@ -15,13 +15,14 @@ LICENSE=	LGPL20
 LICENSE_FILE=	${WRKSRC}/COPYING
 
 GNU_CONFIGURE=	yes
-USES=		gmake libtool
+USES=		compiler:features gmake libtool
 USE_SDL=	sdl
 USE_LDCONFIG=	yes
 CONFIGURE_ENV=	GLBASE="${LOCALBASE}" \
 		CC="${CXX}" REAL_CC="${CC}" \
 		SDL_CONFIG="${SDL_CONFIG}"
 CPPFLAGS+=	-I${LOCALBASE}/include
+CFLAGS+=	${COMPILER_FEATURES:Mc++11:C/.+/-Wno-error=narrowing/}
 
 #If you want to try the opengl/gtk player (which doesn't seem to work)
 #comment out the following line.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801051156.w05Bus8n052453>