GreycLab / CImg

The CImg Library is a small and open-source C++ toolkit for image processing
http://cimg.eu
Other
1.49k stars 286 forks source link

a lot of build warnings when using version of the lib greater than 1.6.9 on CentOS 5 #203

Closed Magallo closed 6 years ago

Magallo commented 6 years ago

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:

#include <CImg-2.2.3/CImg.h>

using namespace std;
using namespace cimg_library;

int main(int argc, char** argv)
{
    CImg<unsigned char> img(300, 200, 1, 3);
    img.fill(32);
    img.noise(128);
    img.blur(2.f, 0.f, 0.f);
    const unsigned char white[] = { 255, 255, 255 };
    img.draw_text(80, 80, "Hello World", white, 0, 32);

    //save as png, and also gif, and also jpg
    img.save("/tmp/cimg.png");
    img.save("/tmp/cimg.gif");
    img.save("/tmp/cimg.jpg");

    return 0;
}

Here the warnings:

g++ -Dcimg_display=0 -c -g -I/usr/local/CImg -MMD -MP -MF "build/Debug/GNU-Linux/main.o.d" -o build/Debug/GNU-Linux/main.o main.cpp /usr/local/CImg/CImg-2.2.3/CImg.h: In member function ‘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.3/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.3/CImg.h:24772: 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.3/CImg.h:24756: 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.3/CImg.h:60982: instantiated from here /usr/local/CImg/CImg-2.2.3/CImg.h:18184: warning: passing ‘double’ for argument 1 to ‘double cimg_library::cimg::factorial(int)’ /usr/local/CImg/CImg-2.2.3/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.3/CImg.h:24772: 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.3/CImg.h:24756: 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.3/CImg.h:60982: instantiated from here /usr/local/CImg/CImg-2.2.3/CImg.h:18192: warning: passing ‘double’ for argument 1 to ‘double cimg_library::cimg::fibonacci(int)’ /usr/local/CImg/CImg-2.2.3/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.3/CImg.h:24772: 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.3/CImg.h:24756: 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.3/CImg.h:60982: instantiated from here /usr/local/CImg/CImg-2.2.3/CImg.h:18624: warning: passing ‘double’ for argument 1 to ‘double cimg_library::cimg::permutations(int, int, bool)’ /usr/local/CImg/CImg-2.2.3/CImg.h:18624: warning: passing ‘double’ for argument 2 to ‘double cimg_library::cimg::permutations(int, int, bool)’ /usr/local/CImg/CImg-2.2.3/CImg.h: In static member function ‘static double cimg_library::CImg::_cimg_math_parser::mp_list_Ixyz(cimg_library::CImg::_cimg_math_parser&) [with T = float]’: /usr/local/CImg/CImg-2.2.3/CImg.h:17299: 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.3/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.3/CImg.h:24772: 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.3/CImg.h:24756: 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.3/CImg.h:60982: instantiated from here /usr/local/CImg/CImg-2.2.3/CImg.h:21987: warning: passing ‘const double’ for argument 1 to ‘bool cimg_library::CImg::containsXYZC(int, int, int, int) const [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h:21987: warning: passing ‘const double’ for argument 2 to ‘bool cimg_library::CImg::containsXYZC(int, int, int, int) const [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h:21987: warning: passing ‘const double’ for argument 3 to ‘bool cimg_library::CImg::containsXYZC(int, int, int, int) const [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h: In static member function ‘static double cimg_library::CImg::_cimg_math_parser::mp_list_Jxyz(cimg_library::CImg::_cimg_math_parser&) [with T = float]’: /usr/local/CImg/CImg-2.2.3/CImg.h:17299: 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.3/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.3/CImg.h:24772: 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.3/CImg.h:24756: 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.3/CImg.h:60982: instantiated from here /usr/local/CImg/CImg-2.2.3/CImg.h:22095: warning: passing ‘const double’ for argument 1 to ‘bool cimg_library::CImg::containsXYZC(int, int, int, int) const [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h:22095: warning: passing ‘const double’ for argument 2 to ‘bool cimg_library::CImg::containsXYZC(int, int, int, int) const [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h:22095: warning: passing ‘const double’ for argument 3 to ‘bool cimg_library::CImg::containsXYZC(int, int, int, int) const [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h: In static member function ‘static double cimg_library::CImg::_cimg_math_parser::mp_Ixyz(cimg_library::CImg::_cimg_math_parser&) [with T = float]’: /usr/local/CImg/CImg-2.2.3/CImg.h:17305: 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.3/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.3/CImg.h:24772: 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.3/CImg.h:24756: 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.3/CImg.h:60982: instantiated from here /usr/local/CImg/CImg-2.2.3/CImg.h:23400: warning: passing ‘const double’ for argument 1 to ‘bool cimg_library::CImg::containsXYZC(int, int, int, int) const [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h:23400: warning: passing ‘const double’ for argument 2 to ‘bool cimg_library::CImg::containsXYZC(int, int, int, int) const [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h:23400: warning: passing ‘const double’ for argument 3 to ‘bool cimg_library::CImg::containsXYZC(int, int, int, int) const [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h: In static member function ‘static double cimg_library::CImg::_cimg_math_parser::mp_Jxyz(cimg_library::CImg::_cimg_math_parser&) [with T = float]’: /usr/local/CImg/CImg-2.2.3/CImg.h:17305: 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.3/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.3/CImg.h:24772: 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.3/CImg.h:24756: 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.3/CImg.h:60982: instantiated from here /usr/local/CImg/CImg-2.2.3/CImg.h:23508: warning: passing ‘const double’ for argument 1 to ‘bool cimg_library::CImg::containsXYZC(int, int, int, int) const [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h:23508: warning: passing ‘const double’ for argument 2 to ‘bool cimg_library::CImg::containsXYZC(int, int, int, int) const [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h:23508: warning: passing ‘const double’ for argument 3 to ‘bool cimg_library::CImg::containsXYZC(int, int, int, int) const [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h: In static member function ‘static double cimg_library::CImg::_cimg_math_parser::mp_factorial(cimg_library::CImg::_cimg_math_parser&) [with T = float]’: /usr/local/CImg/CImg-2.2.3/CImg.h:18183: 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.3/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.3/CImg.h:24772: 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.3/CImg.h:24756: 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.3/CImg.h:60982: instantiated from here /usr/local/CImg/CImg-2.2.3/CImg.h:20910: warning: passing ‘double’ for argument 1 to ‘double cimg_library::cimg::factorial(int)’ /usr/local/CImg/CImg-2.2.3/CImg.h: In static member function ‘static double cimg_library::CImg::_cimg_math_parser::mp_permutations(cimg_library::CImg::_cimg_math_parser&) [with T = float]’: /usr/local/CImg/CImg-2.2.3/CImg.h:18625: 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.3/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.3/CImg.h:24772: 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.3/CImg.h:24756: 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.3/CImg.h:60982: instantiated from here /usr/local/CImg/CImg-2.2.3/CImg.h:22460: warning: passing ‘double’ for argument 1 to ‘double cimg_library::cimg::permutations(int, int, bool)’ /usr/local/CImg/CImg-2.2.3/CImg.h:22460: warning: passing ‘double’ for argument 2 to ‘double cimg_library::cimg::permutations(int, int, bool)’ /usr/local/CImg/CImg-2.2.3/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.3/CImg.h:18637: 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.3/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.3/CImg.h:24772: 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.3/CImg.h:24756: 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.3/CImg.h:60982: instantiated from here /usr/local/CImg/CImg-2.2.3/CImg.h:22477: warning: converting to ‘int’ from ‘double’ /usr/local/CImg/CImg-2.2.3/CImg.h: In member function ‘cimg_library::CImg& cimg_library::CImg::_draw_ellipse(int, int, float, float, float, const tc, float, unsigned int) [with tc = float, T = float]’: /usr/local/CImg/CImg-2.2.3/CImg.h:44260: instantiated from ‘cimg_library::CImg& cimg_library::CImg::draw_ellipse(int, int, float, float, float, const tc, float) [with tc = float, T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h:20853: instantiated from ‘static double cimg_library::CImg::_cimg_math_parser::mp_ellipse(cimg_library::CImg::_cimg_math_parser&) [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h:18122: 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.3/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.3/CImg.h:24772: 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.3/CImg.h:24756: 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.3/CImg.h:60982: instantiated from here /usr/local/CImg/CImg-2.2.3/CImg.h:44330: warning: passing ‘const float’ for argument 3 to ‘cimg_library::CImg& cimg_library::CImg::draw_circle(int, int, int, const tc, float, unsigned int) [with tc = float, T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h:44260: instantiated from ‘cimg_library::CImg& cimg_library::CImg::draw_ellipse(int, int, float, float, float, const tc, float) [with tc = float, T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h:20853: instantiated from ‘static double cimg_library::CImg::_cimg_math_parser::mp_ellipse(cimg_library::CImg::_cimg_math_parser&) [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h:18122: 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.3/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.3/CImg.h:24772: 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.3/CImg.h:24756: 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.3/CImg.h:60982: instantiated from here /usr/local/CImg/CImg-2.2.3/CImg.h:44331: warning: passing ‘const float’ for argument 3 to ‘cimg_library::CImg& cimg_library::CImg::draw_circle(int, int, int, const tc, float) [with tc = float, T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h: In member function ‘cimg_library::CImg<typename cimg_library::cimg::last<T, int>::type> cimg_library::CImg::_select(cimg_library::CImgDisplay&, const char, unsigned int, unsigned int, int, int, int, bool, bool, bool, bool) const [with T = double]’: /usr/local/CImg/CImg-2.2.3/CImg.h:51502: instantiated from ‘const cimg_library::CImg& cimg_library::CImg::_display(cimg_library::CImgDisplay&, const char, bool, unsigned int, bool, bool) const [with T = double]’ /usr/local/CImg/CImg-2.2.3/CImg.h:51440: instantiated from ‘const cimg_library::CImg& cimg_library::CImg::display(const char, bool, unsigned int, bool) const [with T = double]’ /usr/local/CImg/CImg-2.2.3/CImg.h:20677: instantiated from ‘static double cimg_library::CImg::_cimg_math_parser::mp_display_memory(cimg_library::CImg::_cimg_math_parser&) [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h:17873: 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.3/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.3/CImg.h:24772: 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.3/CImg.h:24756: 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.3/CImg.h:60982: instantiated from here /usr/local/CImg/CImg-2.2.3/CImg.h:47726: warning: passing ‘float’ for argument 1 to ‘cimg_library::CImg cimg_library::CImg::get_vector_at(unsigned int, unsigned int, unsigned int) const [with T = double]’ /usr/local/CImg/CImg-2.2.3/CImg.h:47726: warning: passing ‘float’ for argument 2 to ‘cimg_library::CImg cimg_library::CImg::get_vector_at(unsigned int, unsigned int, unsigned int) const [with T = double]’ /usr/local/CImg/CImg-2.2.3/CImg.h:47726: warning: passing ‘float’ for argument 3 to ‘cimg_library::CImg cimg_library::CImg::get_vector_at(unsigned int, unsigned int, unsigned int) const [with T = double]’ /usr/local/CImg/CImg-2.2.3/CImg.h: In member function ‘cimg_library::CImg<typename cimg_library::cimg::last<T, int>::type> cimg_library::CImg::_select(cimg_library::CImgDisplay&, const char, unsigned int, unsigned int, int, int, int, bool, bool, bool, bool) const [with T = float]’: /usr/local/CImg/CImg-2.2.3/CImg.h:51502: instantiated from ‘const cimg_library::CImg& cimg_library::CImg::_display(cimg_library::CImgDisplay&, const char, bool, unsigned int, bool, bool) const [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h:51440: instantiated from ‘const cimg_library::CImg& cimg_library::CImg::display(const char, bool, unsigned int, bool) const [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h:21108: instantiated from ‘static double cimg_library::CImg::_cimg_math_parser::mp_image_display(cimg_library::CImg::_cimg_math_parser&) [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h:17921: 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.3/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.3/CImg.h:24772: 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.3/CImg.h:24756: 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.3/CImg.h:60982: instantiated from here /usr/local/CImg/CImg-2.2.3/CImg.h:47726: warning: passing ‘float’ for argument 1 to ‘cimg_library::CImg cimg_library::CImg::get_vector_at(unsigned int, unsigned int, unsigned int) const [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h:47726: warning: passing ‘float’ for argument 2 to ‘cimg_library::CImg cimg_library::CImg::get_vector_at(unsigned int, unsigned int, unsigned int) const [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h:47726: warning: passing ‘float’ for argument 3 to ‘cimg_library::CImg cimg_library::CImg::get_vector_at(unsigned int, unsigned int, unsigned int) const [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h: In member function ‘cimg_library::CImg& cimg_library::CImg::_draw_ellipse(int, int, float, float, float, const tc, float, unsigned int) [with tc = unsigned char, T = unsigned char]’: /usr/local/CImg/CImg-2.2.3/CImg.h:44260: instantiated from ‘cimg_library::CImg& cimg_library::CImg::draw_ellipse(int, int, float, float, float, const tc, float) [with tc = unsigned char, T = unsigned char]’ /usr/local/CImg/CImg-2.2.3/CImg.h:47696: instantiated from ‘cimg_library::CImg<typename cimg_library::cimg::last<T, int>::type> cimg_library::CImg::_select(cimg_library::CImgDisplay&, const char, unsigned int, unsigned int, int, int, int, bool, bool, bool, bool) const [with T = double]’ /usr/local/CImg/CImg-2.2.3/CImg.h:51502: instantiated from ‘const cimg_library::CImg& cimg_library::CImg::_display(cimg_library::CImgDisplay&, const char, bool, unsigned int, bool, bool) const [with T = double]’ /usr/local/CImg/CImg-2.2.3/CImg.h:51440: instantiated from ‘const cimg_library::CImg& cimg_library::CImg::display(const char, bool, unsigned int, bool) const [with T = double]’ /usr/local/CImg/CImg-2.2.3/CImg.h:20677: instantiated from ‘static double cimg_library::CImg::_cimg_math_parser::mp_display_memory(cimg_library::CImg::_cimg_math_parser&) [with T = float]’ /usr/local/CImg/CImg-2.2.3/CImg.h:17873: 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.3/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.3/CImg.h:24772: 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.3/CImg.h:24756: 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.3/CImg.h:60982: instantiated from here /usr/local/CImg/CImg-2.2.3/CImg.h:44330: warning: passing ‘const float’ for argument 3 to ‘cimg_library::CImg& cimg_library::CImg::draw_circle(int, int, int, const tc, float, unsigned int) [with tc = unsigned char, T = unsigned char]’ /usr/local/CImg/CImg-2.2.3/CImg.h:44331: warning: passing ‘const float’ for argument 3 to ‘cimg_library::CImg& cimg_library::CImg::draw_circle(int, int, int, const tc, float) [with tc = unsigned char, T = unsigned char]’ mkdir -p dist/Debug/GNU-Linux g++ -Dcimg_display=0 -o dist/Debug/GNU-Linux/encimg build/Debug/GNU-Linux/main.o -lm -lpthread -lX11

BUILD SUCCESSFUL (total time: 19s)

As mentioned above, if I use version 1.6.9 oof the library none of the above warnings appear.

Thanks for your help.

dtschump commented 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 !

Magallo commented 6 years ago

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?

dtschump commented 6 years ago

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.

Magallo commented 6 years ago

Hi, how can I take the 2.2.4_pre version that you fixed to test it? Could you give me some help? Thanks.

dtschump commented 6 years ago

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.

Magallo commented 6 years ago

Ok, I'll try today and I will let you know. Thanks!

Magallo commented 6 years ago

Sorry, I accidentally closed the issue (I pressed "Close and comment" instead of just "Comment").

Magallo commented 6 years ago

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.

dtschump commented 6 years ago

Ah thanks, this one should be fixed by https://github.com/dtschump/CImg/commit/aa04cba88754d654bb71b128a40a5ba42f40ab96

Magallo commented 6 years ago

Ok, with the changes you pointed, now everything builds fine. Thanks a lot! I'm looking forward for the next official relase!