Suppressed hundreds of useless MSVC warnings (can be reenabled setting cmake variable ENABLE_NOISY_WARNINGS to ON). Fixed some of remaining warnings.

This commit is contained in:
Andrey Kamaev
2012-04-08 21:49:19 +00:00
parent c16a1d86cc
commit 7cc7a3f37d
23 changed files with 200 additions and 181 deletions

View File

@@ -267,7 +267,7 @@ set_target_properties(${the_module} PROPERTIES LINK_INTERFACE_LIBRARIES "")
ocv_add_precompiled_headers(${the_module})
if(CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_COMPILER_IS_GNUCXX AND NOT ENABLE_NOISY_WARNINGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
endif()

View File

@@ -3321,9 +3321,9 @@ bool CvCaptureCAM_DShow::setProperty( int property_id, double value )
{
if( width != VI.getWidth(index) || height != VI.getHeight(index) )//|| fourcc != VI.getFourcc(index) )
{
int fps = VI.getFPS(index);
int fps = static_cast<int>(VI.getFPS(index));
VI.stopDevice(index);
VI.setIdealFramerate(index,fps);
VI.setIdealFramerate(index, fps);
VI.setupDeviceFourcc(index, width, height, fourcc);
}
width = height = fourcc = -1;