fixed some GCC 4.4 warnings
This commit is contained in:
parent
752c4bc48b
commit
de4f1aeb06
@ -562,10 +562,10 @@ if (WITH_TBB)
|
||||
|
||||
if (TBB_FOUND)
|
||||
set(HAVE_TBB 1)
|
||||
if(NOT "${TBB_INCLUDE_DIRS}" STREQUAL "")
|
||||
include_directories("${TBB_INCLUDE_DIRS}")
|
||||
if(NOT ${TBB_INCLUDE_DIRS} STREQUAL "")
|
||||
include_directories(${TBB_INCLUDE_DIRS})
|
||||
endif()
|
||||
link_directories("${TBB_LIBRARY_DIRS}")
|
||||
link_directories(${TBB_LIBRARY_DIRS})
|
||||
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${TBB_LIBRARIES})
|
||||
else()
|
||||
set(TBB_DEFAULT_INCLUDE_DIRS
|
||||
|
@ -1454,8 +1454,7 @@ void SVD::backSubst( const Mat& w, const Mat& u, const Mat& vt, const Mat& rhs,
|
||||
AutoBuffer<double> buffer(nb);
|
||||
CV_Assert( u.data && vt.data && w.data );
|
||||
|
||||
if( rhs.data )
|
||||
CV_Assert( rhs.type() == type && rhs.rows == m );
|
||||
CV_Assert( rhs.data == 0 || (rhs.type() == type && rhs.rows == m) );
|
||||
|
||||
dst.create( n, nb, type );
|
||||
if( type == CV_32F )
|
||||
|
@ -685,8 +685,11 @@ void extractImageCOI(const CvArr* arr, Mat& ch, int coi)
|
||||
{
|
||||
Mat mat = cvarrToMat(arr, false, true, 1);
|
||||
ch.create(mat.dims, mat.size, mat.depth());
|
||||
if(coi < 0)
|
||||
CV_Assert( CV_IS_IMAGE(arr) && (coi = cvGetImageCOI((const IplImage*)arr)-1) >= 0 );
|
||||
if(coi < 0)
|
||||
{
|
||||
CV_Assert( CV_IS_IMAGE(arr) );
|
||||
coi = cvGetImageCOI((const IplImage*)arr)-1;
|
||||
}
|
||||
CV_Assert(0 <= coi && coi < mat.channels());
|
||||
int _pairs[] = { coi, 0 };
|
||||
mixChannels( &mat, 1, &ch, 1, _pairs, 1 );
|
||||
@ -695,8 +698,11 @@ void extractImageCOI(const CvArr* arr, Mat& ch, int coi)
|
||||
void insertImageCOI(const Mat& ch, CvArr* arr, int coi)
|
||||
{
|
||||
Mat mat = cvarrToMat(arr, false, true, 1);
|
||||
if(coi < 0)
|
||||
CV_Assert( CV_IS_IMAGE(arr) && (coi = cvGetImageCOI((const IplImage*)arr)-1) >= 0 );
|
||||
if(coi < 0)
|
||||
{
|
||||
CV_Assert( CV_IS_IMAGE(arr) );
|
||||
coi = cvGetImageCOI((const IplImage*)arr)-1;
|
||||
}
|
||||
CV_Assert(ch.size == mat.size && ch.depth() == mat.depth() && 0 <= coi && coi < mat.channels());
|
||||
int _pairs[] = { 0, coi };
|
||||
mixChannels( &ch, 1, &mat, 1, _pairs, 1 );
|
||||
|
@ -57,8 +57,7 @@ void goodFeaturesToTrack( const Mat& image, vector<Point2f>& corners,
|
||||
{
|
||||
CV_Assert( qualityLevel > 0 && minDistance >= 0 && maxCorners >= 0 );
|
||||
|
||||
if( mask.data )
|
||||
CV_Assert( mask.type() == CV_8UC1 && mask.size() == image.size() );
|
||||
CV_Assert( mask.empty() || (mask.type() == CV_8UC1 && mask.size() == image.size()) );
|
||||
|
||||
Mat eig, tmp;
|
||||
if( useHarrisDetector )
|
||||
|
@ -117,8 +117,7 @@ static void histPrepareImages( const Mat* images, int nimages, const int* channe
|
||||
Size& imsize, vector<double>& uniranges )
|
||||
{
|
||||
int i, j, c;
|
||||
if(!channels)
|
||||
CV_Assert( nimages == dims );
|
||||
CV_Assert( channels != 0 || nimages == dims );
|
||||
|
||||
imsize = images[0].size();
|
||||
int depth = images[0].depth(), esz1 = (int)images[0].elemSize1();
|
||||
|
@ -427,7 +427,7 @@ float CvKNearest::find_nearest( const Mat& _samples, int k, Mat* _results,
|
||||
{
|
||||
if(!(_results->data && (_results->type() == CV_32F ||
|
||||
(_results->type() == CV_32S && regression)) &&
|
||||
(_results->cols == 1 || _results->rows == 1) ||
|
||||
(_results->cols == 1 || _results->rows == 1) &&
|
||||
_results->cols + _results->rows - 1 == _samples.rows) )
|
||||
_results->create(_samples.rows, 1, CV_32F);
|
||||
presults = &(results = *_results);
|
||||
|
@ -76,8 +76,6 @@ public:
|
||||
void allocate(int dims, const int* sizes, int type, int*& refcount,
|
||||
uchar*& datastart, uchar*& data, size_t* step)
|
||||
{
|
||||
static int ncalls = 0;
|
||||
|
||||
int depth = CV_MAT_DEPTH(type);
|
||||
int cn = CV_MAT_CN(type);
|
||||
const int f = (int)(sizeof(size_t)/8);
|
||||
@ -108,8 +106,6 @@ public:
|
||||
|
||||
void deallocate(int* refcount, uchar* datastart, uchar* data)
|
||||
{
|
||||
static int ncalls = 0;
|
||||
|
||||
if( !refcount )
|
||||
return;
|
||||
PyObject* o = pyObjectFromRefcount(refcount);
|
||||
@ -124,8 +120,6 @@ enum { ARG_NONE = 0, ARG_MAT = 1, ARG_SCALAR = 2 };
|
||||
|
||||
static int pyopencv_to(const PyObject* o, Mat& m, const char* name = "<unknown>", bool allowND=true)
|
||||
{
|
||||
static int call_idx = 0;
|
||||
|
||||
if(!o || o == Py_None)
|
||||
{
|
||||
if( !m.data )
|
||||
|
Loading…
x
Reference in New Issue
Block a user