mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-19 02:16:34 +08:00
build: eliminate GCC8 warnings
This commit is contained in:
@@ -237,7 +237,8 @@ public:
|
|||||||
if (p.y >= size.height)
|
if (p.y >= size.height)
|
||||||
p.y = size.height - 1;
|
p.y = size.height - 1;
|
||||||
|
|
||||||
memcpy(&samples[i * stride + j * nSamples], &bm.samples[p.y * stride + p.x * nSamples], sizeof(BackgroundSampleType) * nSamples);
|
for (int k = 0; k < nSamples; k++)
|
||||||
|
samples[i * stride + j * nSamples + k] = bm.samples[p.y * stride + p.x * nSamples + k];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -294,7 +294,7 @@ int main(int argc, char* argv[])
|
|||||||
*/
|
*/
|
||||||
cv::waitKey(10);
|
cv::waitKey(10);
|
||||||
}
|
}
|
||||||
}catch(cv::Exception e)
|
} catch(const cv::Exception& e)
|
||||||
{
|
{
|
||||||
std::cerr<<"Error using Retina : "<<e.what()<<std::endl;
|
std::cerr<<"Error using Retina : "<<e.what()<<std::endl;
|
||||||
}
|
}
|
||||||
|
@@ -994,8 +994,8 @@ static void spread(const Mat& src, Mat& dst, int T)
|
|||||||
int height = src.rows - r;
|
int height = src.rows - r;
|
||||||
for (int c = 0; c < T; ++c)
|
for (int c = 0; c < T; ++c)
|
||||||
{
|
{
|
||||||
orUnaligned8u(&src.at<unsigned char>(r, c), static_cast<const int>(src.step1()), dst.ptr(),
|
orUnaligned8u(&src.at<unsigned char>(r, c), static_cast<int>(src.step1()), dst.ptr(),
|
||||||
static_cast<const int>(dst.step1()), src.cols - c, height);
|
static_cast<int>(dst.step1()), src.cols - c, height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -4,5 +4,8 @@ include(CMake/Installation.cmake)
|
|||||||
set(BUILD_SHARED_LIBS OFF) # Force static libs for 3rdparty dependencies
|
set(BUILD_SHARED_LIBS OFF) # Force static libs for 3rdparty dependencies
|
||||||
|
|
||||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Winconsistent-missing-override -Wsuggest-override)
|
ocv_warnings_disable(CMAKE_CXX_FLAGS -Winconsistent-missing-override -Wsuggest-override)
|
||||||
|
if(CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)
|
||||||
|
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wclass-memaccess)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory(libmv)
|
add_subdirectory(libmv)
|
Reference in New Issue
Block a user