Re: [Lcms-user] Build warnings on OSX / clang

2017-08-02 Thread Martí Maria
*To:* Marti Maria *Cc:* Noel Carboni; lcms-user@lists.sourceforge.net *Subject:* Re: [Lcms-user] Build warnings on OSX / clang Thanks to Noel for offering fixes, and to Marti for graciously accepting :) I've gone through similar issues with my JPEG 2000 codec, much of the code inherited from

Re: [Lcms-user] Build warnings on OSX / clang

2017-07-26 Thread Noel Carboni
> please note that this is using C language, not C++. It is possible the VS 2017 C++ is compiler is pickier about matching data types. There is nothing wrong with that, as it could uncover issues where data types are not consistent. LOL about your comment earlier about it taking months to merge

Re: [Lcms-user] Build warnings on OSX / clang

2017-07-26 Thread Martí Maria
That is what I get when cross-compiling to ARM by gcc 4.6.3 arm-elf-gcc.exe -c -DCMS_NO_PTHREADS -std=c99 --pedantic -Wall -I ../include *.c cmscgats.c: In function 'ParseFloatNumber': cmscgats.c:643:5: warning: array subscript has type 'char' [-Wchar-subscripts] cmsopt.c: In function

Re: [Lcms-user] Build warnings on OSX / clang

2017-07-26 Thread Noel Carboni
> Thanks, Noel. Might be safer to do this on linux, where you can run make check > to test. May I ask how I turn on -Wall on linux build for lcms ? There is a capability to do the checking on Windows as well; I just don't have it set up presently. We rushed through getting the project to

Re: [Lcms-user] Build warnings on OSX / clang

2017-07-26 Thread Bob Friesenhahn
On Wed, 26 Jul 2017, Aaron Boxer wrote: Thanks, Noel. Might be safer to do this on linux, where you can run make check to test. May I ask how I turn on -Wall on linux build for lcms ? The normal way (quite well documented) is ./configure CFLAGS='-O2 -Wall' ... I use these GCC options

Re: [Lcms-user] Build warnings on OSX / clang

2017-07-26 Thread Richard Hughes
On 26 July 2017 at 05:26, Noel Carboni wrote: > Here's the source code: > http://Noel.ProDigitalSoftware.com/temp/LittleCMS_2.8NC.zip Can you provide a patch please? With a patch I can test it with the colord self tests which run on quite a few different types of

Re: [Lcms-user] Build warnings on OSX / clang

2017-07-25 Thread Noel Carboni
To: Marti Maria Cc: Noel Carboni; lcms-user@lists.sourceforge.net Subject: Re: [Lcms-user] Build warnings on OSX / clang Thanks to Noel for offering fixes, and to Marti for graciously accepting :) I've gone through similar issues with my JPEG 2000 codec, much of the code inherited from

Re: [Lcms-user] Build warnings on OSX / clang

2017-07-24 Thread Aaron Boxer
pare the files and see whether you feel the changes are safe > enough. I'll make it my mission not to change the logic or your intent > with the style. > > > > -Noel > > > > *From:* Marti Maria [mailto:marti.ma...@littlecms.com] > *Sent:* Mon, July 24, 2017 6:09 PM > *To

Re: [Lcms-user] Build warnings on OSX / clang

2017-07-24 Thread Marti Maria
Mon, July 24, 2017 6:09 PMTo: Noel CarboniCc: lcms-user@lists.sourceforge.netSubject: Re: [Lcms-user] Build warnings on OSX / clang Hi,  Sometimes I use  signed to unsigned promotion without cast. This is safe  if values are small and positive. Mostly to avoid casts in memset, memmove, calloc, etc. which looks

Re: [Lcms-user] Build warnings on OSX / clang

2017-07-24 Thread Noel Carboni
to change the logic or your intent with the style. -Noel From: Marti Maria [mailto:marti.ma...@littlecms.com] Sent: Mon, July 24, 2017 6:09 PM To: Noel Carboni Cc: lcms-user@lists.sourceforge.net Subject: Re: [Lcms-user] Build wa

Re: [Lcms-user] Build warnings on OSX / clang

2017-07-24 Thread Marti Maria
Hi, Sometimes I use  signed to unsigned promotion without cast. This is safe  if values are small and positive. Mostly to avoid casts in memset, memmove, calloc, etc. which looks really ugly.If you can found other cases, like that one in cmsgamma.c, please let me know. But this latter was fixed

Re: [Lcms-user] Build warnings on OSX / clang

2017-07-24 Thread Aaron Boxer
> Thanks. I've turned on this warning in my build because the implicit >> conversion can cause >> hard-to-trace bugs. >> > > Inappropriate explicit casts in the C code can also cause hard-to-trace > bugs and explicit casts should be minimized. I think that usually implicit > type conversion

Re: [Lcms-user] Build warnings on OSX / clang

2017-07-24 Thread Bob Friesenhahn
On Mon, 24 Jul 2017, Aaron Boxer wrote: Hi Marti, Thanks. I've turned on this warning in my build because the implicit conversion can cause hard-to-trace bugs. Inappropriate explicit casts in the C code can also cause hard-to-trace bugs and explicit casts should be minimized. I think that

Re: [Lcms-user] Build warnings on OSX / clang

2017-07-24 Thread Aaron Boxer
Hi Marti, Thanks. I've turned on this warning in my build because the implicit conversion can cause hard-to-trace bugs. Regards, Aaron On Mon, Jul 24, 2017 at 3:10 AM, Martí Maria wrote: > > Thanks for reporting. > > lcms uses the C feature of implicit sign

Re: [Lcms-user] Build warnings on OSX / clang

2017-07-24 Thread Martí Maria
Thanks for reporting. lcms uses the C feature of implicit sign conversion, so if you activate -Wsign-conversion you will get some warnings. This not set in the included build system. Regards Marti On 7/24/2017 3:16 AM, Aaron Boxer wrote: Hello, Just wanted to report a few warnings I am

[Lcms-user] Build warnings on OSX / clang

2017-07-23 Thread Aaron Boxer
Hello, Just wanted to report a few warnings I am getting when building with clang. http://my.cdash.org/viewBuildError.php?type=1=1257347 For example: grok/thirdparty/liblcms2/src/cmsgamma.c:143:32: warning: implicit conversion changes signedness: 'cmsUInt32Number' (aka 'unsigned int') to 'int'