Fixed number of warnings. Fixed mingw64 build.

This commit is contained in:
Andrey Kamaev
2012-06-12 14:46:12 +00:00
parent 02e3afae3a
commit c5aba337e9
110 changed files with 2232 additions and 2367 deletions

View File

@@ -48,6 +48,11 @@
#include "opencv2/core/core_c.h"
#include "opencv2/core/core.hpp"
#if defined _MSC_VER && _MSC_VER >= 1200
#pragma warning( disable: 4714 ) //__forceinline is not inlined
#pragma warning( disable: 4127 ) //conditional expression is constant
#endif
namespace cv
{

View File

@@ -984,13 +984,13 @@ _AccTp normL2Sqr(const _Tp* a, const _Tp* b, int n)
#if CV_ENABLE_UNROLLED
for(; i <= n - 4; i += 4 )
{
_AccTp v0 = a[i] - b[i], v1 = a[i+1] - b[i+1], v2 = a[i+2] - b[i+2], v3 = a[i+3] - b[i+3];
_AccTp v0 = _AccTp(a[i] - b[i]), v1 = _AccTp(a[i+1] - b[i+1]), v2 = _AccTp(a[i+2] - b[i+2]), v3 = _AccTp(a[i+3] - b[i+3]);
s += v0*v0 + v1*v1 + v2*v2 + v3*v3;
}
#endif
for( ; i < n; i++ )
{
_AccTp v = (_AccTp)(a[i] - b[i]);
_AccTp v = _AccTp(a[i] - b[i]);
s += v*v;
}
return s;
@@ -1024,13 +1024,13 @@ _AccTp normL1(const _Tp* a, const _Tp* b, int n)
#if CV_ENABLE_UNROLLED
for(; i <= n - 4; i += 4 )
{
_AccTp v0 = a[i] - b[i], v1 = a[i+1] - b[i+1], v2 = a[i+2] - b[i+2], v3 = a[i+3] - b[i+3];
_AccTp v0 = _AccTp(a[i] - b[i]), v1 = _AccTp(a[i+1] - b[i+1]), v2 = _AccTp(a[i+2] - b[i+2]), v3 = _AccTp(a[i+3] - b[i+3]);
s += std::abs(v0) + std::abs(v1) + std::abs(v2) + std::abs(v3);
}
#endif
for( ; i < n; i++ )
{
_AccTp v = (_AccTp)(a[i] - b[i]);
_AccTp v = _AccTp(a[i] - b[i]);
s += std::abs(v);
}
return s;

View File

@@ -79,7 +79,7 @@
# define CV_ENABLE_UNROLLED 1
#endif
#if (defined _M_X64 && _MSC_VER >= 1400) || (__GNUC__ >= 4 && defined __x86_64__)
#if (defined _M_X64 && defined _MSC_VER && _MSC_VER >= 1400) || (__GNUC__ >= 4 && defined __x86_64__)
# if defined WIN32
# include <intrin.h>
# endif

View File

@@ -46,8 +46,8 @@ namespace cv
// On Win64 optimized versions of DFT and DCT fail the tests (fixed in VS2010)
#if defined _MSC_VER && !defined CV_ICC && defined _M_X64 && _MSC_VER < 1600
#pragma optimize("", off)
#pragma warning( disable : 4748 )
# pragma optimize("", off)
# pragma warning(disable: 4748)
#endif
/****************************************************************************************\

View File

@@ -43,11 +43,6 @@
#ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__
#if defined _MSC_VER && _MSC_VER >= 1200
// disable warnings related to inline functions
#pragma warning( disable: 4251 4711 4710 4514 )
#endif
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif

View File

@@ -1264,7 +1264,7 @@ struct NormOp : public BaseElemWiseOp
dst.at<double>(0,0) = cvtest::norm(src[0], normType, mask);
dst.at<double>(0,1) = cvtest::norm(src[0], src[1], normType, mask);
}
void generateScalars(int, RNG& rng)
void generateScalars(int, RNG& /*rng*/)
{
}
double getMaxErr(int)

View File

@@ -2023,14 +2023,7 @@ void Core_GraphScanTest::run( int )
event = "End of procedure";
break;
default:
#if defined _MSC_VER && _MSC_VER >= 1200
#pragma warning( push )
#pragma warning( disable : 4127 )
#endif
CV_TS_SEQ_CHECK_CONDITION( 0, "Invalid code appeared during graph scan" );
#if defined _MSC_VER && _MSC_VER >= 1200
#pragma warning( pop )
#endif
}
ts->printf( cvtest::TS::LOG, "%s", event );