Commit 1248ebeb authored by Alexander Alekhin's avatar Alexander Alekhin

build: fix warnings

parent df483cfd
...@@ -66,7 +66,6 @@ static inline int getLabel(int quantized) ...@@ -66,7 +66,6 @@ static inline int getLabel(int quantized)
case 128: return 7; case 128: return 7;
default: default:
CV_Error(Error::StsBadArg, "Invalid value of quantized parameter"); CV_Error(Error::StsBadArg, "Invalid value of quantized parameter");
return -1; //avoid warning
} }
} }
......
...@@ -56,6 +56,7 @@ void from32FTo32S(Mat &img, Mat &outImg, int nI, float *mapping) ...@@ -56,6 +56,7 @@ void from32FTo32S(Mat &img, Mat &outImg, int nI, float *mapping)
{ {
int rows = img.rows, cols = img.cols; int rows = img.rows, cols = img.cols;
size_t alls = (size_t)rows * cols; size_t alls = (size_t)rows * cols;
CV_Assert(alls < INT_MAX);
CV_Assert(img.isContinuous()); CV_Assert(img.isContinuous());
float *imgPtr = img.ptr<float>(); float *imgPtr = img.ptr<float>();
...@@ -66,7 +67,7 @@ void from32FTo32S(Mat &img, Mat &outImg, int nI, float *mapping) ...@@ -66,7 +67,7 @@ void from32FTo32S(Mat &img, Mat &outImg, int nI, float *mapping)
for (size_t i = 0; i < alls; i++) for (size_t i = 0; i < alls; i++)
{ {
pairFI& d = data[i]; pairFI& d = data[i];
d.second = i; d.second = (int)i;
d.first = imgPtr[i]; d.first = imgPtr[i];
} }
...@@ -128,7 +129,7 @@ void from32FTo32S(Mat &img, Mat &outImg, int nI, float *mapping) ...@@ -128,7 +129,7 @@ void from32FTo32S(Mat &img, Mat &outImg, int nI, float *mapping)
mapping[cnt] = data[(baseI+i-1)>>1].first; //median mapping[cnt] = data[(baseI+i-1)>>1].first; //median
cnt++; cnt++;
base = data[i].first; base = data[i].first;
baseI = i; baseI = (int)i;
} }
retImgPtr[data[i].second] = cnt; retImgPtr[data[i].second] = cnt;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment