Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jan 2018 11:12:28 +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: r458127 - head/graphics/libraw/files
Message-ID:  <201801051112.w05BCSg0035284@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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<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

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<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?201801051112.w05BCSg0035284>