1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-19 02:16:34 +08:00

build: fix warnings

This commit is contained in:
Alexander Alekhin
2018-04-24 15:10:23 +03:00
parent df483cfdc9
commit 1248ebeb03
2 changed files with 3 additions and 3 deletions

View File

@@ -66,7 +66,6 @@ static inline int getLabel(int quantized)
case 128: return 7;
default:
CV_Error(Error::StsBadArg, "Invalid value of quantized parameter");
return -1; //avoid warning
}
}

View File

@@ -56,6 +56,7 @@ void from32FTo32S(Mat &img, Mat &outImg, int nI, float *mapping)
{
int rows = img.rows, cols = img.cols;
size_t alls = (size_t)rows * cols;
CV_Assert(alls < INT_MAX);
CV_Assert(img.isContinuous());
float *imgPtr = img.ptr<float>();
@@ -66,7 +67,7 @@ void from32FTo32S(Mat &img, Mat &outImg, int nI, float *mapping)
for (size_t i = 0; i < alls; i++)
{
pairFI& d = data[i];
d.second = i;
d.second = (int)i;
d.first = imgPtr[i];
}
@@ -128,7 +129,7 @@ void from32FTo32S(Mat &img, Mat &outImg, int nI, float *mapping)
mapping[cnt] = data[(baseI+i-1)>>1].first; //median
cnt++;
base = data[i].first;
baseI = i;
baseI = (int)i;
}
retImgPtr[data[i].second] = cnt;
}