Merge pull request #7641 from alalek:warnings

pull/7726/head
Vadim Pisarevsky 8 years ago
commit 9638dfcd85
  1. 4
      3rdparty/libtiff/CMakeLists.txt
  2. 5
      3rdparty/openexr/CMakeLists.txt
  3. 2
      modules/calib3d/src/homography_decomp.cpp
  4. 2
      modules/core/include/opencv2/core/hal/intrin_cpp.hpp
  5. 2
      modules/highgui/src/window_gtk.cpp
  6. 4
      modules/superres/src/optical_flow.cpp
  7. 3
      modules/videoio/src/cap_ffmpeg_impl.hpp

@ -86,7 +86,9 @@ else()
endif() endif()
ocv_warnings_disable(CMAKE_C_FLAGS -Wno-unused-but-set-variable -Wmissing-prototypes -Wmissing-declarations -Wundef -Wunused -Wsign-compare ocv_warnings_disable(CMAKE_C_FLAGS -Wno-unused-but-set-variable -Wmissing-prototypes -Wmissing-declarations -Wundef -Wunused -Wsign-compare
-Wcast-align -Wshadow -Wno-maybe-uninitialized -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast) -Wcast-align -Wshadow -Wno-maybe-uninitialized -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast
-Wmisleading-indentation
)
ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-parameter) # clang ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-parameter) # clang
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wmissing-declarations -Wunused-parameter) ocv_warnings_disable(CMAKE_CXX_FLAGS -Wmissing-declarations -Wunused-parameter)
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4018 /wd4100 /wd4127 /wd4311 /wd4701 /wd4706) # vs2005 ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4018 /wd4100 /wd4127 /wd4311 /wd4701 /wd4706) # vs2005

@ -39,8 +39,9 @@ endif()
source_group("Include" FILES ${lib_hdrs} ) source_group("Include" FILES ${lib_hdrs} )
source_group("Src" FILES ${lib_srcs}) source_group("Src" FILES ${lib_srcs})
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wunused -Wsign-compare -Wundef -Wmissing-declarations -Wuninitialized -Wswitch -Wparentheses -Warray-bounds -Wextra) ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wunused -Wsign-compare -Wundef -Wmissing-declarations -Wuninitialized -Wswitch -Wparentheses -Warray-bounds -Wextra
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wdeprecated-declarations) -Wdeprecated-declarations -Wmisleading-indentation
)
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4018 /wd4099 /wd4100 /wd4101 /wd4127 /wd4189 /wd4245 /wd4305 /wd4389 /wd4512 /wd4701 /wd4702 /wd4706 /wd4800) # vs2005 ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4018 /wd4099 /wd4100 /wd4101 /wd4127 /wd4189 /wd4245 /wd4305 /wd4389 /wd4512 /wd4701 /wd4702 /wd4706 /wd4800) # vs2005
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4334) # vs2005 Win64 ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4334) # vs2005 Win64
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4244) # vs2008 ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4244) # vs2008

@ -447,7 +447,7 @@ int decomposeHomographyMat(InputArray _H,
Mat K = _K.getMat().reshape(1, 3); Mat K = _K.getMat().reshape(1, 3);
CV_Assert(K.cols == 3 && K.rows == 3); CV_Assert(K.cols == 3 && K.rows == 3);
auto_ptr<HomographyDecomp> hdecomp(new HomographyDecompInria); cv::Ptr<HomographyDecomp> hdecomp(new HomographyDecompInria);
vector<CameraMotion> motions; vector<CameraMotion> motions;
hdecomp->decomposeHomography(H, K, motions); hdecomp->decomposeHomography(H, K, motions);

@ -455,7 +455,9 @@ template<typename _Tp, int n> inline v_reg<_Tp, n> operator ~ (const v_reg<_Tp,
{ {
v_reg<_Tp, n> c; v_reg<_Tp, n> c;
for( int i = 0; i < n; i++ ) for( int i = 0; i < n; i++ )
{
c.s[i] = V_TypeTraits<_Tp>::reinterpret_from_int(~V_TypeTraits<_Tp>::reinterpret_int(a.s[i])); c.s[i] = V_TypeTraits<_Tp>::reinterpret_from_int(~V_TypeTraits<_Tp>::reinterpret_int(a.s[i]));
}
return c; return c;
} }

@ -1983,7 +1983,7 @@ static gboolean icvOnMouse( GtkWidget *widget, GdkEvent *event, gpointer user_da
break; break;
#endif //GTK_VERSION3_4 #endif //GTK_VERSION3_4
case GDK_SCROLL_LEFT: cv_event = CV_EVENT_MOUSEHWHEEL; case GDK_SCROLL_LEFT: cv_event = CV_EVENT_MOUSEHWHEEL;
case GDK_SCROLL_UP: flags |= ((-(int)1 << 16)); case GDK_SCROLL_UP: flags |= ~0xffff;
break; break;
case GDK_SCROLL_RIGHT: cv_event = CV_EVENT_MOUSEHWHEEL; case GDK_SCROLL_RIGHT: cv_event = CV_EVENT_MOUSEHWHEEL;
case GDK_SCROLL_DOWN: flags |= (((int)1 << 16)); case GDK_SCROLL_DOWN: flags |= (((int)1 << 16));

@ -65,7 +65,9 @@ namespace
virtual void impl(InputArray input0, InputArray input1, OutputArray dst) = 0; virtual void impl(InputArray input0, InputArray input1, OutputArray dst) = 0;
private: private:
#ifdef HAVE_OPENCL
bool ocl_calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2); bool ocl_calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2);
#endif
int work_type_; int work_type_;
@ -85,6 +87,7 @@ namespace
{ {
} }
#ifdef HAVE_OPENCL
bool CpuOpticalFlow::ocl_calc(InputArray _frame0, InputArray _frame1, OutputArray _flow1, OutputArray _flow2) bool CpuOpticalFlow::ocl_calc(InputArray _frame0, InputArray _frame1, OutputArray _flow1, OutputArray _flow2)
{ {
UMat frame0 = arrGetUMat(_frame0, ubuf_[0]); UMat frame0 = arrGetUMat(_frame0, ubuf_[0]);
@ -116,6 +119,7 @@ namespace
return true; return true;
} }
#endif
void CpuOpticalFlow::calc(InputArray _frame0, InputArray _frame1, OutputArray _flow1, OutputArray _flow2) void CpuOpticalFlow::calc(InputArray _frame0, InputArray _frame1, OutputArray _flow1, OutputArray _flow2)
{ {

@ -2455,11 +2455,14 @@ bool OutputMediaStream_FFMPEG::open(const char* fileName, int width, int height,
} }
// write the stream header, if any // write the stream header, if any
int header_err =
#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0) #if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(53, 2, 0)
av_write_header(oc_); av_write_header(oc_);
#else #else
avformat_write_header(oc_, NULL); avformat_write_header(oc_, NULL);
#endif #endif
if (header_err != 0)
return false;
return true; return true;
} }

Loading…
Cancel
Save