Date: Fri, 5 Jan 2018 11:13:12 +0000 (UTC) From: Jan Beich <jbeich@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r458128 - branches/2018Q1/graphics/libraw/files Message-ID: <201801051113.w05BDCLB035431@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jbeich Date: Fri Jan 5 11:13:12 2018 New Revision: 458128 URL: https://svnweb.freebsd.org/changeset/ports/458128 Log: MFH: r458127 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<int16_t>( ) 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<int16_t>( ) 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<int16_t>( ) Reported by: antoine (via bug 224669) Obtained from: upstream Approved by: ports-secteam blanket Added: branches/2018Q1/graphics/libraw/files/patch-internal_libraw__x3f.cpp - copied unchanged from r458127, head/graphics/libraw/files/patch-internal_libraw__x3f.cpp Modified: Directory Properties: branches/2018Q1/ (props changed) Copied: branches/2018Q1/graphics/libraw/files/patch-internal_libraw__x3f.cpp (from r458127, head/graphics/libraw/files/patch-internal_libraw__x3f.cpp) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2018Q1/graphics/libraw/files/patch-internal_libraw__x3f.cpp Fri Jan 5 11:13:12 2018 (r458128, copy of r458127, head/graphics/libraw/files/patch-internal_libraw__x3f.cpp) @@ -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<int16_t>( ) +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<int16_t>( ) +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<int16_t>( ) + +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; +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801051113.w05BDCLB035431>