Closed Magallo closed 6 years ago
That's a super-useful report, thank you ! I've done a quick fix on current version 2.2.3 (now 2.2.4_pre), and pushed the modifications on the github repo. I'd be really interested by another test on this updated version, removing useless warning is really interesting, but hard due to the number of different compilers (and compiler versions) that output different warnings. Thanks for your help !
It's a pleasure. Just for my information, could you explain to me why the most recent versions of the library return these warnings while the 1.6.9 does not?
Well, there have been a lot of new features added to the library since 1.6.9, including a parser and evaluator of mathematical expressions. Most warnings came from that part.
Hi, how can I take the 2.2.4_pre version that you fixed to test it? Could you give me some help? Thanks.
Simply pick this file : https://github.com/dtschump/CImg/blob/master/CImg.h?raw=true It's the very latest version from the git repository.
Ok, I'll try today and I will let you know. Thanks!
Sorry, I accidentally closed the issue (I pressed "Close and comment" instead of just "Comment").
Here is the report with 2.2.4_pre. A lot less warning messages indeed:
g++ -Dcimg_display=0 -c -g -I/usr/local/CImg -I../../../share/src/metracommon/include -I../../../share/src/pgspp/include -MMD -MP -MF "build/Debug/GNU-Linux/encode.o.d" -o build/Debug/GNU-Linux/encode.o encode.cpp /usr/local/CImg/CImg-2.2.4_pre/CImg.h: In static member function ‘static double cimg_library::CImg
::_cimg_math_parser::mp_polygon(cimg_library::CImg ::_cimg_math_parser&) [with T = float]’: /usr/local/CImg/CImg-2.2.4_pre/CImg.h:18643: instantiated from ‘unsigned int cimg_library::CImg ::_cimg_math_parser::compile(char, char, unsigned int, unsigned int, bool) [with T = float]’ /usr/local/CImg/CImg-2.2.4_pre/CImg.h:15320: instantiated from ‘cimg_library::CImg ::_cimg_math_parser::_cimg_math_parser(const char , const char, const cimg_library::CImg&, cimg_library::CImg , const cimg_library::CImgList, cimg_library::CImgList , bool) [with T = float]’ /usr/local/CImg/CImg-2.2.4_pre/CImg.h:24778: instantiated from ‘double cimg_library::CImg ::_eval(cimg_library::CImg , const char, double, double, double, double, const cimg_library::CImgList , cimg_library::CImgList ) const [with T = float]’ /usr/local/CImg/CImg-2.2.4_pre/CImg.h:24762: instantiated from ‘double cimg_library::CImg ::eval(const char, double, double, double, double, const cimg_library::CImgList , cimg_library::CImgList *) const [with T = float]’ /usr/local/CImg/CImg-2.2.4_pre/CImg.h:60989: instantiated from here /usr/local/CImg/CImg-2.2.4_pre/CImg.h:22483: warning: converting to ‘int’ from ‘double’
Ciao.
Ah thanks, this one should be fixed by https://github.com/dtschump/CImg/commit/aa04cba88754d654bb71b128a40a5ba42f40ab96
Ok, with the changes you pointed, now everything builds fine. Thanks a lot! I'm looking forward for the next official relase!
Hi all, I'm using the library on a CentOS 5 system precisely a CentOS release 5.10 (Final) and g++ gcc version 4.1.2 20080704 (Red Hat 4.1.2-55). If I use the version 1.6.9 of the library everything is fine but if I try to use a greater version (I tested 1.7.9, 2.0.4 and 2.2.3 with same results) I get tons of warning messages.
This is my very basic and simple code:
Here the warnings:
As mentioned above, if I use version 1.6.9 oof the library none of the above warnings appear.
Thanks for your help.