$OpenBSD: patch-internal_libraw_x3f_cpp,v 1.6 2018/05/18 06:04:33 rsadowski Exp $

fix non-constant-expression cannot be narrowed from type 'int' to 'int16_t'
(aka 'short') with clang6
Index: internal/libraw_x3f.cpp
--- internal/libraw_x3f.cpp.orig
+++ internal/libraw_x3f.cpp
@@ -1398,7 +1398,9 @@ 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 off16 = static_cast<int16_t>(offset);
+
+  int16_t c[3] = {off16, off16, off16};
   int col;
   bit_state_t BS;
 
