Bug 357952

Summary: Problem with conversion from ‘int’ to ‘boolean’ when using libjpeg 9a
Product: [Applications] digikam Reporter: Jan Wolter <online>
Component: Plugin-DImg-RAWAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: major    
Priority: NOR    
Version: 5.0.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.0.0
Attachments: Patch for conversion problem

Description Jan Wolter 2016-01-13 20:21:03 UTC
During compilation I get the following error:

[ 36%] Building CXX object core/libs/rawengine/libraw/CMakeFiles/libraw.dir/RawSpeed/DngDecoderSlices.cpp.o
/home/jan/Downloads/digikamGIT/core/libs/rawengine/libraw/RawSpeed/DngDecoderSlices.cpp: In member function ‘void RawSpeed::DngDecoderSlices::decodeSlice(RawSpeed::DngDecoderThread*)’:
/home/jan/Downloads/digikamGIT/core/libs/rawengine/libraw/RawSpeed/DngDecoderSlices.cpp:180:60: error: invalid conversion from ‘int’ to ‘boolean’ [-fpermissive]
         if (JPEG_HEADER_OK != jpeg_read_header(&dinfo, TRUE))
                                                            ^
In file included from /home/jan/Downloads/digikamGIT/core/libs/rawengine/libraw/RawSpeed/StdAfx.h:71:0,
                 from /home/jan/Downloads/digikamGIT/core/libs/rawengine/libraw/RawSpeed/DngDecoderSlices.cpp:1:
/usr/local/include/jpeglib.h:1039:13: error:   initializing argument 2 of ‘int jpeg_read_header(j_decompress_ptr, boolean)’ [-fpermissive]
 EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
             ^
make[2]: *** [core/libs/rawengine/libraw/CMakeFiles/libraw.dir/RawSpeed/DngDecoderSlices.cpp.o] Error 1
make[1]: *** [core/libs/rawengine/libraw/CMakeFiles/libraw.dir/all] Error 2
make: *** [all] Error 2

Reproducible: Always




The same problem is documented for darktable, see https://bugs.gentoo.org/show_bug.cgi?id=520894

I will post the copied bugfix immediately.
Comment 1 Jan Wolter 2016-01-13 20:26:06 UTC
Created attachment 96627 [details]
Patch for conversion problem
Comment 2 caulier.gilles 2016-01-14 06:45:22 UTC
Git commit 24c1b81a17ddc2bf8a898cc8823234e1affb57db by Gilles Caulier.
Committed on 14/01/2016 at 06:44.
Pushed by cgilles into branch 'master'.

apply patch #96627 to fix bool cast with libjpeg 9 and RawSpeed
FIXED-IN: 5.0.0

M  +3    -1    NEWS
M  +1    -1    libs/rawengine/libraw/RawSpeed/DngDecoderSlices.cpp

http://commits.kde.org/digikam/24c1b81a17ddc2bf8a898cc8823234e1affb57db