Commit dc704d77 authored by Maksim Shabunin's avatar Maksim Shabunin

Fixed several GCC 5.x warnings

parent 595fd275
...@@ -95,7 +95,7 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4267 /wd4305 /wd4306) # vs2008 Win64 ...@@ -95,7 +95,7 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4267 /wd4305 /wd4306) # vs2008 Win64
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4703) # vs2012 ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4703) # vs2012
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4456 /wd4457 /wd4312) # vs2015 ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4456 /wd4457 /wd4312) # vs2015
ocv_warnings_disable(CMAKE_C_FLAGS /wd4267 /wd4244 /wd4018) ocv_warnings_disable(CMAKE_C_FLAGS /wd4267 /wd4244 /wd4018 /wd4311 /wd4312)
if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)) if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC))
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
......
...@@ -97,6 +97,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) ...@@ -97,6 +97,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
add_extra_compiler_option(-Wno-narrowing) add_extra_compiler_option(-Wno-narrowing)
add_extra_compiler_option(-Wno-delete-non-virtual-dtor) add_extra_compiler_option(-Wno-delete-non-virtual-dtor)
add_extra_compiler_option(-Wno-unnamed-type-template-args) add_extra_compiler_option(-Wno-unnamed-type-template-args)
add_extra_compiler_option(-Wno-comment)
endif() endif()
add_extra_compiler_option(-fdiagnostics-show-option) add_extra_compiler_option(-fdiagnostics-show-option)
......
...@@ -1126,7 +1126,7 @@ CV_EXPORTS InstrNode* getTrace(); ...@@ -1126,7 +1126,7 @@ CV_EXPORTS InstrNode* getTrace();
CV_EXPORTS void resetTrace(); CV_EXPORTS void resetTrace();
CV_EXPORTS void setFlags(int modeFlags); CV_EXPORTS void setFlags(int modeFlags);
CV_EXPORTS int getFlags(); CV_EXPORTS int getFlags();
}; }
} //namespace cv } //namespace cv
......
...@@ -13,7 +13,6 @@ using namespace ::testing; ...@@ -13,7 +13,6 @@ using namespace ::testing;
using std::tr1::tuple; using std::tr1::tuple;
using std::tr1::get; using std::tr1::get;
namespace {
struct OpenCLState struct OpenCLState
{ {
...@@ -64,5 +63,3 @@ OCL_PERF_TEST_P(UMatTest, CustomPtr, Combine(Values(sz1080p, sz2160p), Bool(), : ...@@ -64,5 +63,3 @@ OCL_PERF_TEST_P(UMatTest, CustomPtr, Combine(Values(sz1080p, sz2160p), Bool(), :
SANITY_CHECK_NOTHING(); SANITY_CHECK_NOTHING();
} }
} // namespace cvtest
...@@ -56,7 +56,7 @@ static void cvTsSimpleSeqShiftAndCopy( CvTsSimpleSeq* seq, int from_idx, int to_ ...@@ -56,7 +56,7 @@ static void cvTsSimpleSeqShiftAndCopy( CvTsSimpleSeq* seq, int from_idx, int to_
(seq->count - from_idx)*elem_size ); (seq->count - from_idx)*elem_size );
} }
seq->count += to_idx - from_idx; seq->count += to_idx - from_idx;
if( elem && to_idx > from_idx ) if( elem )
memcpy( seq->array + from_idx*elem_size, elem, (to_idx - from_idx)*elem_size ); memcpy( seq->array + from_idx*elem_size, elem, (to_idx - from_idx)*elem_size );
} }
......
...@@ -1022,7 +1022,7 @@ protected: ...@@ -1022,7 +1022,7 @@ protected:
/** @brief Flann-based descriptor matcher. /** @brief Flann-based descriptor matcher.
This matcher trains flann::Index_ on a train descriptor collection and calls its nearest search This matcher trains cv::flann::Index on a train descriptor collection and calls its nearest search
methods to find the best matches. So, this matcher may be faster when matching a large train methods to find the best matches. So, this matcher may be faster when matching a large train
collection than the brute force matcher. FlannBasedMatcher does not support masking permissible collection than the brute force matcher. FlannBasedMatcher does not support masking permissible
matches of descriptor sets because flann::Index does not support this. : matches of descriptor sets because flann::Index does not support this. :
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment