Some changes to support mingw-w64

- IPP is disabled by default when compiler is mingw (couldn't make it
work)
- fixed some warnings
- fixed some `__GNUC__` version checks (for correctness and convenience)
- removed UTF-8 BOM from hough.cpp (fixes #5253)
This commit is contained in:
Maksim Shabunin
2015-09-01 00:59:08 +03:00
parent c223c05b82
commit 771af4f32d
14 changed files with 34 additions and 25 deletions

View File

@@ -271,7 +271,7 @@ enum BorderTypes {
# endif
#endif
#ifndef CV_StaticAssert
# if defined(__GNUC__) && (__GNUC__ > 3) && (__GNUC_MINOR__ > 2)
# if defined(__GNUC__) && (__GNUC__*100 + __GNUC_MINOR__ > 302)
# define CV_StaticAssert(condition, reason) ({ extern int __attribute__((error("CV_StaticAssert: " reason " " #condition))) CV_StaticAssert(); ((condition) ? 0 : CV_StaticAssert()); })
# else
template <bool x> struct CV_StaticAssert_failed;
@@ -296,7 +296,7 @@ enum BorderTypes {
CV_DO_PRAGMA(warning(push)) \
CV_DO_PRAGMA(warning(disable: 4996))
#define CV_SUPPRESS_DEPRECATED_END CV_DO_PRAGMA(warning(pop))
#elif defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))))
#elif defined (__clang__) || ((__GNUC__) && (__GNUC__*100 + __GNUC_MINOR__ > 405))
#define CV_SUPPRESS_DEPRECATED_START \
CV_DO_PRAGMA(GCC diagnostic push) \
CV_DO_PRAGMA(GCC diagnostic ignored "-Wdeprecated-declarations")

View File

@@ -578,7 +578,7 @@ int DeviceInfo::deviceID() const
inline
size_t DeviceInfo::freeMemory() const
{
size_t _totalMemory, _freeMemory;
size_t _totalMemory = 0, _freeMemory = 0;
queryMemory(_totalMemory, _freeMemory);
return _freeMemory;
}
@@ -586,7 +586,7 @@ size_t DeviceInfo::freeMemory() const
inline
size_t DeviceInfo::totalMemory() const
{
size_t _totalMemory, _freeMemory;
size_t _totalMemory = 0, _freeMemory = 0;
queryMemory(_totalMemory, _freeMemory);
return _totalMemory;
}