compiler problem

asked 2019-07-08 06:29:53 -0600

There is an error when I complied OpenCV-2.4.10 /home/pi/opencv-2.4.10/modules/contrib/src/chamfermatching.cpp: In member function ‘void cv::ChamferMatcher::Matching::computeDistanceTransform(cv::Mat&, cv::Mat&, cv::Mat&, float, float, float)’: /home/pi/opencv-2.4.10/modules/contrib/src/chamfermatching.cpp:969:30: error: the compiler can assume that the address of ‘annotate_img’ will never be NULL [-Werror=address] if (&annotate_img!=NULL) { ^ /home/pi/opencv-2.4.10/modules/contrib/src/chamfermatching.cpp:1016:34: error: the compiler can assume that the address of ‘annotate_img’ will never be NULL [-Werror=address] if (&annotate_img!=NULL) { ^ /home/pi/opencv-2.4.10/modules/contrib/src/chamfermatching.cpp: In member function ‘cv::ChamferMatcher::Match* cv::ChamferMatcher::Matching::localChamferDistance(cv::Point, cv::Mat&, cv::Mat&, cv::ChamferMatcher::Template, float)’: /home/pi/opencv-2.4.10/modules/contrib/src/chamfermatching.cpp:1111:25: error: the compiler can assume that the address of ‘orientation_img’ will never be NULL [-Werror=address] if (&orientation_img!=NULL) { ^ /home/pi/opencv-2.4.10/modules/contrib/src/chamfermatching.cpp:1111:5: warning: nonnull argument ‘orientation_img’ compared to NULL [-Wnonnull-compare] if (&orientation_img!=NULL) { ^~ /home/pi/opencv-2.4.10/modules/contrib/src/chamfermatching.cpp: In member function ‘void cv::ChamferMatcher::Matching::computeDistanceTransform(cv::Mat&, cv::Mat&, cv::Mat&, float, float, float)’: /home/pi/opencv-2.4.10/modules/contrib/src/chamfermatching.cpp:1016:17: warning: nonnull argument ‘annotate_img’ compared to NULL [-Wnonnull-compare] if (&annotate_img!=NULL) { ^~ /home/pi/opencv-2.4.10/modules/contrib/src/chamfermatching.cpp:969:13: warning: nonnull argument ‘annotate_img’ compared to NULL [-Wnonnull-compare] if (&annotate_img!=NULL) { ^~ cc1plus: some warnings being treated as errors modules/contrib/CMakeFiles/opencv_contrib.dir/build.make:158: recipe for target 'modules/contrib/CMakeFiles/opencv_contrib.dir/src/chamfermatching.cpp.o' failed make[2]: [modules/contrib/CMakeFiles/opencv_contrib.dir/src/chamfermatching.cpp.o] Error 1 CMakeFiles/Makefile2:2938: recipe for target 'modules/contrib/CMakeFiles/opencv_contrib.dir/all' failed make[1]: [modules/contrib/CMakeFiles/opencv_contrib.dir/all] Error 2 Makefile:149: recipe for target 'all' failed make: ** [all] Error 2

edit retag flag offensive close merge delete

Comments

1

is there any reason to choose outdated 2.4 ?

berak gravatar imageberak ( 2019-07-08 06:37:29 -0600 )edit