From 9a88aea697c3903daab061632c04749962b536e0 Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Tue, 21 Feb 2012 14:07:44 +0000 Subject: [PATCH] Eliminated all compiler warnings on Android --- 3rdparty/libtiff/CMakeLists.txt | 4 ++++ modules/core/include/opencv2/core/operations.hpp | 3 ++- modules/objdetect/src/lsvmtbbversion.cpp | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/3rdparty/libtiff/CMakeLists.txt b/3rdparty/libtiff/CMakeLists.txt index 924c22e..ce2904a 100644 --- a/3rdparty/libtiff/CMakeLists.txt +++ b/3rdparty/libtiff/CMakeLists.txt @@ -88,6 +88,10 @@ endif() add_library(${the_target} STATIC ${lib_srcs} ${lib_hdrs}) +if(CMAKE_COMPILER_IS_GNUCXX) + set_source_files_properties(tif_stream.cxx PROPERTIES COMPILE_FLAGS "-Wno-sign-compare") +endif() + set_target_properties(${the_target} PROPERTIES OUTPUT_NAME "${the_target}" diff --git a/modules/core/include/opencv2/core/operations.hpp b/modules/core/include/opencv2/core/operations.hpp index 5f1d1c2..a79b99b 100644 --- a/modules/core/include/opencv2/core/operations.hpp +++ b/modules/core/include/opencv2/core/operations.hpp @@ -3655,12 +3655,13 @@ public: static int isInstance(const void* ptr) { static _ClsName dummy; + static void* dummyp = &dummy; union { const void* p; const void** pp; } a, b; - a.p = &dummy; + a.p = dummyp; b.p = ptr; return *a.pp == *b.pp; } diff --git a/modules/objdetect/src/lsvmtbbversion.cpp b/modules/objdetect/src/lsvmtbbversion.cpp index 3c87930..c9f174a 100644 --- a/modules/objdetect/src/lsvmtbbversion.cpp +++ b/modules/objdetect/src/lsvmtbbversion.cpp @@ -32,8 +32,8 @@ public: CvPoint ****_partsDisplacement) : n(_n), b(_b), maxXBorder(_maxXBorder), maxYBorder(_maxYBorder), scoreThreshold(_scoreThreshold), - kLevels(_kLevels), score(_score), points(_points), kPoints(_kPoints), - partsDisplacement(_partsDisplacement) + kLevels(_kLevels), score(_score), points(_points), + partsDisplacement(_partsDisplacement), kPoints(_kPoints) { filters = _filters; H = _H; -- 2.7.4