[digikam] [Bug 366786] New: Libraw fails to build with CLang (non constant initializer narrowing)

Matthias Fauconneau via KDE Bugzilla bugzilla_noreply at kde.org
Mon Aug 15 11:27:38 BST 2016


https://bugs.kde.org/show_bug.cgi?id=366786

            Bug ID: 366786
           Summary: Libraw fails to build with CLang (non constant
                    initializer narrowing)
           Product: digikam
           Version: 5.1.0
          Platform: Gentoo Packages
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Raw-Engine
          Assignee: digikam-devel at kde.org
          Reporter: matthias.fauconneau at gmail.com

[ 88%] Building CXX object
libs/rawengine/libraw/CMakeFiles/libraw.dir/src/libraw_cxx.cpp.o
In file included from
/var/tmp/portage/media-gfx/digikam-5.1.0/work/digikam-5.1.0/core/libs/rawengine/libraw/src/libraw_cxx.cpp:5203:
/var/tmp/portage/media-gfx/digikam-5.1.0/work/digikam-5.1.0/core/libs/rawengine/libraw/src/../internal/libraw_x3f.cpp:1249: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};
                  ^~~~~~
/var/tmp/portage/media-gfx/digikam-5.1.0/work/digikam-5.1.0/core/libs/rawengine/libraw/src/../internal/libraw_x3f.cpp:1249:19:
note: 
      insert an explicit cast to silence this issue
  int16_t c[3] = {offset,offset,offset};
                  ^~~~~~
                  static_cast<int16_t>( )
/var/tmp/portage/media-gfx/digikam-5.1.0/work/digikam-5.1.0/core/libs/rawengine/libraw/src/../internal/libraw_x3f.cpp:1249: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};
                         ^~~~~~
/var/tmp/portage/media-gfx/digikam-5.1.0/work/digikam-5.1.0/core/libs/rawengine/libraw/src/../internal/libraw_x3f.cpp:1249:26:
note: 
      insert an explicit cast to silence this issue
  int16_t c[3] = {offset,offset,offset};
                         ^~~~~~
                         static_cast<int16_t>( )
/var/tmp/portage/media-gfx/digikam-5.1.0/work/digikam-5.1.0/core/libs/rawengine/libraw/src/../internal/libraw_x3f.cpp:1249: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};
                                ^~~~~~
/var/tmp/portage/media-gfx/digikam-5.1.0/work/digikam-5.1.0/core/libs/rawengine/libraw/src/../internal/libraw_x3f.cpp:1249:33:
note: 
      insert an explicit cast to silence this issue
  int16_t c[3] = {offset,offset,offset};
                                ^~~~~~
                                static_cast<int16_t>( )

P.S: Is there an option to either disable or use system libraw ?

Reproducible: Always

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Digikam-devel mailing list