fixed gcc and clang warnings

pull/52/head
vludv 11 years ago
parent f3bfb60f18
commit 0687cdd19d
  1. 9
      modules/ximgproc/perf/perf_precomp.hpp
  2. 4
      modules/ximgproc/src/guided_filter.cpp
  3. 4
      modules/ximgproc/test/test_adaptive_manifold_ref_impl.cpp
  4. 4
      modules/ximgproc/test/test_guided_filter.cpp
  5. 4
      modules/ximgproc/test/test_joint_bilateral_filter.cpp
  6. 9
      modules/ximgproc/test/test_precomp.hpp

@ -1,10 +1,17 @@
#ifndef __OPENCV_PERF_PRECOMP_HPP__
#define __OPENCV_PERF_PRECOMP_HPP__
#ifdef __GNUC__
# pragma GCC diagnostic ignored "-Wmissing-declarations"
# if defined __clang__ || defined __APPLE__
# pragma GCC diagnostic ignored "-Wmissing-prototypes"
# pragma GCC diagnostic ignored "-Wextra"
# endif
#endif
#include <opencv2/ts.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/ximgproc.hpp>
#endif

@ -214,7 +214,7 @@ private: /*Parallel body classes*/
vector<Mat> &srcCn;
MulChannelsGuideAndSrc_ParBody(GuidedFilterImpl& gf_, vector<Mat>& srcCn_, vector<vector<Mat> >& cov_)
: gf(gf_), srcCn(srcCn_), cov(cov_) {}
: gf(gf_), cov(cov_), srcCn(srcCn_) {}
void operator () (const Range& range) const;
};
@ -226,7 +226,7 @@ private: /*Parallel body classes*/
vector<Mat> &srcCnMean;
ComputeCovFromSrcChannelsMul_ParBody(GuidedFilterImpl& gf_, vector<Mat>& srcCnMean_, vector<vector<Mat> >& cov_)
: gf(gf_), srcCnMean(srcCnMean_), cov(cov_) {}
: gf(gf_), cov(cov_), srcCnMean(srcCnMean_) {}
void operator () (const Range& range) const;
};

@ -756,9 +756,9 @@ namespace
}
dst.setTo(0.0);
for (int i = 0; i < X.rows; ++i)
for (int k = 0; k < X.rows; ++k)
{
const float* t_row = buf.t[i];
const float* t_row = buf.t[k];
for (int c = 0; c < X.cols; ++c)
{

@ -70,7 +70,7 @@ static Mat convertTypeAndSize(Mat src, int dstType, Size dstSize)
class GuidedFilterRefImpl : public GuidedFilter
{
int rad, height, width, chNum;
int height, width, rad, chNum;
Mat det;
Mat *channels, *exps, **vars, **A;
double eps;
@ -104,7 +104,7 @@ void GuidedFilterRefImpl::meanFilter(const Mat &src, Mat & dst)
}
GuidedFilterRefImpl::GuidedFilterRefImpl(InputArray _guide, int _rad, double _eps) :
height(_guide.rows()), width(_guide.cols()), chNum(_guide.channels()), rad(_rad), eps(_eps)
height(_guide.rows()), width(_guide.cols()), rad(_rad), chNum(_guide.channels()), eps(_eps)
{
Mat guide = _guide.getMat();
CV_Assert(chNum > 0 && chNum <= 3);

@ -55,6 +55,8 @@ static Mat convertTypeAndSize(Mat src, int dstType, Size dstSize)
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
void jointBilateralFilterNaive(InputArray joint, InputArray src, OutputArray dst, int d, double sigmaColor, double sigmaSpace, int borderType = BORDER_DEFAULT);
typedef Vec<float, 1> Vec1f;
typedef Vec<uchar, 1> Vec1b;
@ -130,7 +132,7 @@ void jointBilateralFilterNaive_(InputArray joint_, InputArray src_, OutputArray
}
}
void jointBilateralFilterNaive(InputArray joint, InputArray src, OutputArray dst, int d, double sigmaColor, double sigmaSpace, int borderType = BORDER_DEFAULT)
void jointBilateralFilterNaive(InputArray joint, InputArray src, OutputArray dst, int d, double sigmaColor, double sigmaSpace, int borderType)
{
CV_Assert(src.size() == joint.size() && src.depth() == joint.depth());
CV_Assert(src.type() == CV_32FC1 || src.type() == CV_32FC3 || src.type() == CV_8UC1 || src.type() == CV_8UC3);

@ -1,13 +1,20 @@
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
#ifdef __GNUC__
# pragma GCC diagnostic ignored "-Wmissing-declarations"
# if defined __clang__ || defined __APPLE__
# pragma GCC diagnostic ignored "-Wmissing-prototypes"
# pragma GCC diagnostic ignored "-Wextra"
# endif
#endif
#include <opencv2/ts.hpp>
#include <opencv2/ts/ts_perf.hpp>
#include <opencv2/core.hpp>
#include <opencv2/core/utility.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/ximgproc.hpp>
#endif
Loading…
Cancel
Save