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

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

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

bugzilla_noreply
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: [hidden email]
          Reporter: [hidden email]

[ 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.
Reply | Threaded
Open this post in threaded view
|

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

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

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #1 from [hidden email] ---
>P.S: Is there an option to either disable or use system libraw ?

No because we compile internal libraw with internal Adobe DNG SDK

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

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

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=366786

--- Comment #2 from [hidden email] ---
Do you use "-std=c++11" GCC compiler option ?

What's are the compilation details with you use "export VERBOSE=1"

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 366786] Libraw fails to build with CLang (C++11 non constant initializer narrowing)

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=366786

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Libraw fails to build with  |Libraw fails to build with
                   |CLang (non constant         |CLang (C++11 non constant
                   |initializer narrowing)      |initializer narrowing)

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 366786] Libraw fails to build with CLang (C++11 non constant initializer narrowing)

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=366786

--- Comment #3 from [hidden email] ---
In fact the rules to prevent broken compilation already with Clang under OSX. I
will adjust rules for everywhere.

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 366786] Libraw fails to build with CLang (C++11 non constant initializer narrowing)

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=366786

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
      Latest Commit|                            |http://commits.kde.org/digi
                   |                            |kam/f8530c8e7c0de68bf6e0f02
                   |                            |bf84c8d0b96d3c589
   Version Fixed In|                            |5.2.0
         Resolution|---                         |FIXED

--- Comment #4 from [hidden email] ---
Git commit f8530c8e7c0de68bf6e0f02bf84c8d0b96d3c589 by Gilles Caulier.
Committed on 16/08/2016 at 07:00.
Pushed by cgilles into branch 'master'.

adjust Libraw C++11 rules for linux and Windows too
FIXED-IN: 5.2.0

M  +2    -2    libs/rawengine/libraw/CMakeLists.txt

http://commits.kde.org/digikam/f8530c8e7c0de68bf6e0f02bf84c8d0b96d3c589

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