package/libfreeimage: fix C++11 compliance with gcc-6
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 28 Aug 2016 22:07:34 +0000 (00:07 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 29 Aug 2016 10:25:35 +0000 (12:25 +0200)
Like in cbe01f638249d597fe953, fix C++11 compliance regarding
narrowing types.

Fixes:
    http://autobuild.buildroot.org/results/081/0811531872f69f9febbdc482dfbdd7fb5c35d1c8/
    http://autobuild.buildroot.org/results/90c/90c9cb4ffe705b8c91f4fb602e33e2ba9bcdee77/
    and a few others...

[Peter: use signed char for src[], fix dos/unix new lines]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/libfreeimage/0004-fix-gcc-6.patch [new file with mode: 0644]

diff --git a/package/libfreeimage/0004-fix-gcc-6.patch b/package/libfreeimage/0004-fix-gcc-6.patch
new file mode 100644 (file)
index 0000000..0f10dec
--- /dev/null
@@ -0,0 +1,31 @@
+libraw/dc_raw: fix gcc-6 failures
+
+With gcc-6, it is no longer allowed to narrow the type of constants in
+a constant array declaration.
+
+Fixes:
+    http://autobuild.buildroot.org/results/081/0811531872f69f9febbdc482dfbdd7fb5c35d1c8/build-end.log
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+diff -durN a/Source/LibRawLite/internal/dcraw_common.cpp b/Source/LibRawLite/internal/dcraw_common.cpp
+--- a/Source/LibRawLite/internal/dcraw_common.cpp
++++ b/Source/LibRawLite/internal/dcraw_common.cpp
+@@ -2479,7 +2479,7 @@
\r
+ void CLASS kodak_radc_load_raw()\r
+ {\r
+-  static const char src[] = {\r
++  static const signed char src[] = {\r
+     1,1, 2,3, 3,4, 4,2, 5,7, 6,5, 7,6, 7,8,\r
+     1,0, 2,1, 3,3, 4,4, 5,2, 6,7, 7,6, 8,5, 8,8,\r
+     2,1, 2,3, 3,0, 3,2, 3,4, 4,6, 5,5, 6,7, 6,8,\r
+@@ -4519,7 +4519,7 @@
+  */\r
+ void CLASS vng_interpolate()\r
+ {\r
+-  static const signed char *cp, terms[] = {\r
++  static const int *cp, terms[] = {\r
+     -2,-2,+0,-1,0,0x01, -2,-2,+0,+0,1,0x01, -2,-1,-1,+0,0,0x01,\r
+     -2,-1,+0,-1,0,0x02, -2,-1,+0,+0,0,0x03, -2,-1,+0,+1,1,0x01,\r
+     -2,+0,+0,-1,0,0x06, -2,+0,+0,+0,1,0x02, -2,+0,+0,+1,0,0x03,\r