From owner-svn-ports-head@freebsd.org Fri Jan 5 11:12:29 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4067EC4672; Fri, 5 Jan 2018 11:12:29 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BE623A3B; Fri, 5 Jan 2018 11:12:29 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w05BCStB035285; Fri, 5 Jan 2018 11:12:28 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05BCSg0035284; Fri, 5 Jan 2018 11:12:28 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201801051112.w05BCSg0035284@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Fri, 5 Jan 2018 11:12:28 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r458127 - head/graphics/libraw/files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: head/graphics/libraw/files X-SVN-Commit-Revision: 458127 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 11:12:29 -0000 Author: jbeich Date: Fri Jan 5 11:12:28 2018 New Revision: 458127 URL: https://svnweb.freebsd.org/changeset/ports/458127 Log: graphics/libraw: unbreak build with Clang 6 (C++14 by default) In file included from src/libraw_cxx.cpp:5472: src/../internal/libraw_x3f.cpp:1404:19: error: non-constant-expression cannot be narrowed from type 'int' to 'int16_t' (aka 'short') in initializer list [-Wc++11-narrowing] int16_t c[3] = {offset,offset,offset}; ^~~~~~ src/../internal/libraw_x3f.cpp:1404:19: note: insert an explicit cast to silence this issue int16_t c[3] = {offset,offset,offset}; ^~~~~~ static_cast( ) src/../internal/libraw_x3f.cpp:1404:26: error: non-constant-expression cannot be narrowed from type 'int' to 'int16_t' (aka 'short') in initializer list [-Wc++11-narrowing] int16_t c[3] = {offset,offset,offset}; ^~~~~~ src/../internal/libraw_x3f.cpp:1404:26: note: insert an explicit cast to silence this issue int16_t c[3] = {offset,offset,offset}; ^~~~~~ static_cast( ) src/../internal/libraw_x3f.cpp:1404:33: error: non-constant-expression cannot be narrowed from type 'int' to 'int16_t' (aka 'short') in initializer list [-Wc++11-narrowing] int16_t c[3] = {offset,offset,offset}; ^~~~~~ src/../internal/libraw_x3f.cpp:1404:33: note: insert an explicit cast to silence this issue int16_t c[3] = {offset,offset,offset}; ^~~~~~ static_cast( ) Reported by: antoine (via bug 224669) Obtained from: upstream Added: head/graphics/libraw/files/patch-internal_libraw__x3f.cpp (contents, props changed) Added: head/graphics/libraw/files/patch-internal_libraw__x3f.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/libraw/files/patch-internal_libraw__x3f.cpp Fri Jan 5 11:12:28 2018 (r458127) @@ -0,0 +1,39 @@ +In file included from src/libraw_cxx.cpp:5472: +src/../internal/libraw_x3f.cpp:1404:19: error: non-constant-expression cannot be narrowed from type + 'int' to 'int16_t' (aka 'short') in initializer list [-Wc++11-narrowing] + int16_t c[3] = {offset,offset,offset}; + ^~~~~~ +src/../internal/libraw_x3f.cpp:1404:19: note: insert an explicit cast to silence this issue + int16_t c[3] = {offset,offset,offset}; + ^~~~~~ + static_cast( ) +src/../internal/libraw_x3f.cpp:1404:26: error: non-constant-expression cannot be narrowed from type + 'int' to 'int16_t' (aka 'short') in initializer list [-Wc++11-narrowing] + int16_t c[3] = {offset,offset,offset}; + ^~~~~~ +src/../internal/libraw_x3f.cpp:1404:26: note: insert an explicit cast to silence this issue + int16_t c[3] = {offset,offset,offset}; + ^~~~~~ + static_cast( ) +src/../internal/libraw_x3f.cpp:1404:33: error: non-constant-expression cannot be narrowed from type + 'int' to 'int16_t' (aka 'short') in initializer list [-Wc++11-narrowing] + int16_t c[3] = {offset,offset,offset}; + ^~~~~~ +src/../internal/libraw_x3f.cpp:1404:33: note: insert an explicit cast to silence this issue + int16_t c[3] = {offset,offset,offset}; + ^~~~~~ + static_cast( ) + +https://github.com/LibRaw/LibRaw/commit/6d4b3ea + +--- internal/libraw_x3f.cpp.orig 2017-09-22 06:23:54 UTC ++++ internal/libraw_x3f.cpp +@@ -1401,7 +1401,7 @@ static void huffman_decode_row(x3f_info_t *I, + x3f_image_data_t *ID = &DEH->data_subsection.image_data; + x3f_huffman_t *HUF = ID->huffman; + +- int16_t c[3] = {offset,offset,offset}; ++ int16_t c[3] = {(int16_t)offset,(int16_t)offset,(int16_t)offset}; + int col; + bit_state_t BS; +