From: Alexander Smorkalov Date: Thu, 4 Apr 2013 06:11:33 +0000 (-0700) Subject: Build warning fixes. X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~1314^2~1359^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a914088f29f03f962274e9d0a0cee7fa4bcfcd0d;p=platform%2Fupstream%2Fopencv.git Build warning fixes. --- diff --git a/modules/core/include/opencv2/core/types_c.h b/modules/core/include/opencv2/core/types_c.h index 3a08304..8db2fe7 100644 --- a/modules/core/include/opencv2/core/types_c.h +++ b/modules/core/include/opencv2/core/types_c.h @@ -315,6 +315,8 @@ CV_INLINE int cvRound( double value ) fistp t; } return t; +#elif defined _MSC_VER && defined _M_ARM && defined HAVE_TEGRA_OPTIMIZATION + TEGRA_ROUND(value); #elif defined HAVE_LRINT || defined CV_ICC || defined __GNUC__ # ifdef HAVE_TEGRA_OPTIMIZATION TEGRA_ROUND(value); @@ -324,7 +326,7 @@ CV_INLINE int cvRound( double value ) #else double intpart, fractpart; fractpart = modf(value, &intpart); - if ((abs(fractpart) != 0.5) || ((((int)intpart) % 2) != 0)) + if ((fabs(fractpart) != 0.5) || ((((int)intpart) % 2) != 0)) return (int)(value + (value >= 0 ? 0.5 : -0.5)); else return (int)intpart; diff --git a/modules/imgproc/src/imgwarp.cpp b/modules/imgproc/src/imgwarp.cpp index 2fe8061..848f6e9 100644 --- a/modules/imgproc/src/imgwarp.cpp +++ b/modules/imgproc/src/imgwarp.cpp @@ -1740,7 +1740,7 @@ void cv::resize( InputArray _src, OutputArray _dst, Size dsize, #ifdef HAVE_TEGRA_OPTIMIZATION - if (tegra::resize(src, dst, inv_scale_x, inv_scale_y, interpolation)) + if (tegra::resize(src, dst, (float)inv_scale_x, (float)inv_scale_y, interpolation)) return; #endif