Date: Sat, 6 Jan 2018 02:14:58 +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: r458187 - head/graphics/freeimage/files Message-ID: <201801060214.w062Ewpr016250@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jbeich Date: Sat Jan 6 02:14:57 2018 New Revision: 458187 URL: https://svnweb.freebsd.org/changeset/ports/458187 Log: graphics/freeimage: unbreak build with Clang 6 (C++14 by default) Source/LibRawLite/./internal/dcraw_common.cpp:3786:19: error: constant expression evaluates to 128 which cannot be narrowed to type 'signed char' [-Wc++11-narrowing] -1,-2,-1,+0,0,0x80, -1,-2,+0,-1,0,0x01, -1,-2,+1,-1,0,0x01, ^~~~ Source/LibRawLite/./internal/dcraw_common.cpp:3786:19: note: insert an explicit cast to silence this issue -1,-2,-1,+0,0,0x80, -1,-2,+0,-1,0,0x01, -1,-2,+1,-1,0,0x01, ^~~~ static_cast<signed char>( ) Source/LibRawLite/./internal/dcraw_common.cpp:3787:39: error: constant expression evaluates to 136 which cannot be narrowed to type 'signed char' [-Wc++11-narrowing] -1,-2,+1,+0,1,0x01, -1,-1,-1,+1,0,0x88, -1,-1,+1,-2,0,0x40, ^~~~ Source/LibRawLite/./internal/dcraw_common.cpp:3787:39: note: insert an explicit cast to silence this issue -1,-2,+1,+0,1,0x01, -1,-1,-1,+1,0,0x88, -1,-1,+1,-2,0,0x40, ^~~~ static_cast<signed char>( ) Source/LibRawLite/./internal/dcraw_common.cpp:3794:19: error: constant expression evaluates to 128 which cannot be narrowed to type 'signed char' [-Wc++11-narrowing] +0,-2,+0,+0,1,0x80, +0,-1,+0,+1,1,0x88, +0,-1,+1,-2,0,0x40, ^~~~ Source/LibRawLite/./internal/dcraw_common.cpp:3794:19: note: insert an explicit cast to silence this issue +0,-2,+0,+0,1,0x80, +0,-1,+0,+1,1,0x88, +0,-1,+1,-2,0,0x40, ^~~~ static_cast<signed char>( ) Source/LibRawLite/./internal/dcraw_common.cpp:3794:39: error: constant expression evaluates to 136 which cannot be narrowed to type 'signed char' [-Wc++11-narrowing] +0,-2,+0,+0,1,0x80, +0,-1,+0,+1,1,0x88, +0,-1,+1,-2,0,0x40, ^~~~ Source/LibRawLite/./internal/dcraw_common.cpp:3794:39: note: insert an explicit cast to silence this issue +0,-2,+0,+0,1,0x80, +0,-1,+0,+1,1,0x88, +0,-1,+1,-2,0,0x40, ^~~~ static_cast<signed char>( ) Source/LibRawLite/./internal/dcraw_common.cpp:3800:59: error: constant expression evaluates to 128 which cannot be narrowed to type 'signed char' [-Wc++11-narrowing] +0,+1,+2,+1,0,0x20, +0,+1,+2,+2,0,0x10, +1,-2,+1,+0,0,0x80, ^~~~ Source/LibRawLite/./internal/dcraw_common.cpp:3800:59: note: insert an explicit cast to silence this issue +0,+1,+2,+1,0,0x20, +0,+1,+2,+2,0,0x10, +1,-2,+1,+0,0,0x80, ^~~~ static_cast<signed char>( ) Source/LibRawLite/./internal/dcraw_common.cpp:3801:19: error: constant expression evaluates to 136 which cannot be narrowed to type 'signed char' [-Wc++11-narrowing] +1,-1,+1,+1,0,0x88, +1,+0,+1,+2,0,0x08, +1,+0,+2,-1,0,0x40, ^~~~ Source/LibRawLite/./internal/dcraw_common.cpp:3801:19: note: insert an explicit cast to silence this issue +1,-1,+1,+1,0,0x88, +1,+0,+1,+2,0,0x08, +1,+0,+2,-1,0,0x40, ^~~~ static_cast<signed char>( ) Source/LibRawLite/./internal/dcraw_common.cpp:7384:23: error: constant expression evaluates to 65535 which cannot be narrowed to type 'short' [-Wc++11-narrowing] { "Red One", 704, 0xffff, /* DJC */ ^~~~~~ Source/LibRawLite/./internal/dcraw_common.cpp:7384:23: note: insert an explicit cast to silence this issue { "Red One", 704, 0xffff, /* DJC */ ^~~~~~ static_cast<short>( ) Source/LibRawLite/./internal/dcraw_common.cpp:7943:30: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand] is_raw += (i = get4()) && 1; ^ ~ Source/LibRawLite/./internal/dcraw_common.cpp:7943:30: note: use '&' for a bitwise operation is_raw += (i = get4()) && 1; ^~ & Source/LibRawLite/./internal/dcraw_common.cpp:7943:30: note: remove constant to silence this warning is_raw += (i = get4()) && 1; ~^~~~ Source/LibRawLite/./internal/dcraw_common.cpp:9239:30: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] strcpy (th->soft, "dcraw v"DCRAW_VERSION); ^ Reported by: antoine (via bug 224669) Obtained from: upstream (LibRaw 0.17.0) Added: head/graphics/freeimage/files/patch-Source_LibRawLite_internal_dcraw__common.cpp (contents, props changed) Added: head/graphics/freeimage/files/patch-Source_LibRawLite_internal_dcraw__common.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/freeimage/files/patch-Source_LibRawLite_internal_dcraw__common.cpp Sat Jan 6 02:14:57 2018 (r458187) @@ -0,0 +1,50 @@ +https://github.com/LibRaw/LibRaw/commit/2cef10389486 + +--- Source/LibRawLite/internal/dcraw_common.cpp.orig 2014-02-07 19:48:10 UTC ++++ Source/LibRawLite/internal/dcraw_common.cpp +@@ -3782,22 +3782,22 @@ void CLASS vng_interpolate() + -2,+0,+0,-1,0,0x06, -2,+0,+0,+0,1,0x02, -2,+0,+0,+1,0,0x03, + -2,+1,-1,+0,0,0x04, -2,+1,+0,-1,1,0x04, -2,+1,+0,+0,0,0x06, + -2,+1,+0,+1,0,0x02, -2,+2,+0,+0,1,0x04, -2,+2,+0,+1,0,0x04, +- -1,-2,-1,+0,0,0x80, -1,-2,+0,-1,0,0x01, -1,-2,+1,-1,0,0x01, +- -1,-2,+1,+0,1,0x01, -1,-1,-1,+1,0,0x88, -1,-1,+1,-2,0,0x40, ++ -1,-2,-1,+0,0,-128, -1,-2,+0,-1,0,0x01, -1,-2,+1,-1,0,0x01, ++ -1,-2,+1,+0,1,0x01, -1,-1,-1,+1,0,-120, -1,-1,+1,-2,0,0x40, + -1,-1,+1,-1,0,0x22, -1,-1,+1,+0,0,0x33, -1,-1,+1,+1,1,0x11, + -1,+0,-1,+2,0,0x08, -1,+0,+0,-1,0,0x44, -1,+0,+0,+1,0,0x11, + -1,+0,+1,-2,1,0x40, -1,+0,+1,-1,0,0x66, -1,+0,+1,+0,1,0x22, + -1,+0,+1,+1,0,0x33, -1,+0,+1,+2,1,0x10, -1,+1,+1,-1,1,0x44, + -1,+1,+1,+0,0,0x66, -1,+1,+1,+1,0,0x22, -1,+1,+1,+2,0,0x10, + -1,+2,+0,+1,0,0x04, -1,+2,+1,+0,1,0x04, -1,+2,+1,+1,0,0x04, +- +0,-2,+0,+0,1,0x80, +0,-1,+0,+1,1,0x88, +0,-1,+1,-2,0,0x40, ++ +0,-2,+0,+0,1,-128, +0,-1,+0,+1,1,-120, +0,-1,+1,-2,0,0x40, + +0,-1,+1,+0,0,0x11, +0,-1,+2,-2,0,0x40, +0,-1,+2,-1,0,0x20, + +0,-1,+2,+0,0,0x30, +0,-1,+2,+1,1,0x10, +0,+0,+0,+2,1,0x08, + +0,+0,+2,-2,1,0x40, +0,+0,+2,-1,0,0x60, +0,+0,+2,+0,1,0x20, + +0,+0,+2,+1,0,0x30, +0,+0,+2,+2,1,0x10, +0,+1,+1,+0,0,0x44, + +0,+1,+1,+2,0,0x10, +0,+1,+2,-1,1,0x40, +0,+1,+2,+0,0,0x60, +- +0,+1,+2,+1,0,0x20, +0,+1,+2,+2,0,0x10, +1,-2,+1,+0,0,0x80, +- +1,-1,+1,+1,0,0x88, +1,+0,+1,+2,0,0x08, +1,+0,+2,-1,0,0x40, ++ +0,+1,+2,+1,0,0x20, +0,+1,+2,+2,0,0x10, +1,-2,+1,+0,0,-128, ++ +1,-1,+1,+1,0,-120, +1,+0,+1,+2,0,0x08, +1,+0,+2,-1,0,0x40, + +1,+0,+2,+1,0,0x10 + }, chood[] = { -1,-1, -1,0, -1,+1, 0,+1, +1,+1, +1,0, +1,-1, 0,-1 }; + ushort (*brow[5])[4], *pix; +@@ -7380,7 +7380,7 @@ void CLASS adobe_coeff (const char *t_make, const char + { 8035,435,-962,-6001,13872,2320,-1159,3065,5434 } }, + { "Phase One P65", 0, 0, + { 8035,435,-962,-6001,13872,2320,-1159,3065,5434 } }, +- { "Red One", 704, 0xffff, /* DJC */ ++ { "Red One", 704, -1, /* DJC */ + { 21014,-7891,-2613,-3056,12201,856,-2203,5125,8042 } }, + { "Samsung EK-GN120", 0, 0, /* Adobe; Galaxy NX */ + { 7557,-2522,-739,-4679,12949,1894,-840,1777,5311 } }, +@@ -9235,7 +9235,7 @@ void CLASS tiff_head (struct tiff_hdr *th, int full) + strncpy (th->t_desc, desc, 512); + strncpy (th->t_make, make, 64); + strncpy (th->t_model, model, 64); +- strcpy (th->soft, "dcraw v"DCRAW_VERSION); ++ strcpy (th->soft, "dcraw v" DCRAW_VERSION); + t = localtime (×tamp); + sprintf (th->date, "%04d:%02d:%02d %02d:%02d:%02d", + t->tm_year+1900,t->tm_mon+1,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801060214.w062Ewpr016250>