Skip to content

Commit c5a273f

Browse files
committed
Merge pull request #406 from mshabunin:fix-vs2015
2 parents 3573568 + d15d490 commit c5a273f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

modules/dnn/3rdparty/protobuf/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ configure_file("cmake/config.h.in" "config.h")
9797
if(MSVC)
9898
add_definitions( -D_CRT_SECURE_NO_WARNINGS=1 )
9999
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305 /wd4127 /wd4100 /wd4512 /wd4125 /wd4389 /wd4510 /wd4610 /wd4702)
100+
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4456) # VS 2015
100101
else()
101102
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-deprecated -Wmissing-prototypes -Wmissing-declarations -Wshadow -Wunused-parameter -Wunused-local-typedefs -Wsign-compare -Wsign-promo -Wundef)
102103
endif()
@@ -179,4 +180,4 @@ endif()
179180

180181
if(NOT BUILD_SHARED_LIBS)
181182
ocv_install_target(libprotobuf EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
182-
endif()
183+
endif()

modules/optflow/src/motempl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static bool ocl_updateMotionHistory( InputArray _silhouette, InputOutputArray _m
6262
k.args(ocl::KernelArg::ReadOnlyNoSize(silh), ocl::KernelArg::ReadWrite(mhi),
6363
timestamp, delbound);
6464

65-
size_t globalsize[2] = { silh.cols, silh.rows };
65+
size_t globalsize[2] = { (size_t)silh.cols, (size_t)silh.rows };
6666
return k.run(2, globalsize, NULL, false);
6767
}
6868

modules/xfeatures2d/src/surf.ocl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ bool SURF_OCL::setUpRight(UMat &keypoints)
204204
if( nFeatures == 0 )
205205
return true;
206206

207-
size_t globalThreads[3] = {nFeatures, 1};
207+
size_t globalThreads[3] = {(size_t)nFeatures, 1};
208208
ocl::Kernel kerUpRight("SURF_setUpRight", ocl::xfeatures2d::surf_oclsrc, kerOpts);
209209
return kerUpRight.args(ocl::KernelArg::ReadWrite(keypoints)).run(2, globalThreads, 0, true);
210210
}
@@ -260,7 +260,7 @@ bool SURF_OCL::computeDescriptors(const UMat &keypoints, OutputArray _descriptor
260260
if(!kerCalcDesc.run(2, globalThreads, localThreads, true))
261261
return false;
262262

263-
size_t localThreads_n[] = {dsize, 1};
263+
size_t localThreads_n[] = {(size_t)dsize, 1};
264264
size_t globalThreads_n[] = {nFeatures*localThreads_n[0], localThreads_n[1]};
265265

266266
globalThreads[0] = nFeatures * localThreads[0];

0 commit comments

Comments
 (0)