Skip to content

Commit 1248ebe

Browse files
committed
build: fix warnings
1 parent df483cf commit 1248ebe

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

modules/rgbd/src/linemod.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ static inline int getLabel(int quantized)
6666
case 128: return 7;
6767
default:
6868
CV_Error(Error::StsBadArg, "Invalid value of quantized parameter");
69-
return -1; //avoid warning
7069
}
7170
}
7271

modules/ximgproc/src/weighted_median_filter.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ void from32FTo32S(Mat &img, Mat &outImg, int nI, float *mapping)
5656
{
5757
int rows = img.rows, cols = img.cols;
5858
size_t alls = (size_t)rows * cols;
59+
CV_Assert(alls < INT_MAX);
5960

6061
CV_Assert(img.isContinuous());
6162
float *imgPtr = img.ptr<float>();
@@ -66,7 +67,7 @@ void from32FTo32S(Mat &img, Mat &outImg, int nI, float *mapping)
6667
for (size_t i = 0; i < alls; i++)
6768
{
6869
pairFI& d = data[i];
69-
d.second = i;
70+
d.second = (int)i;
7071
d.first = imgPtr[i];
7172
}
7273

@@ -128,7 +129,7 @@ void from32FTo32S(Mat &img, Mat &outImg, int nI, float *mapping)
128129
mapping[cnt] = data[(baseI+i-1)>>1].first; //median
129130
cnt++;
130131
base = data[i].first;
131-
baseI = i;
132+
baseI = (int)i;
132133
}
133134
retImgPtr[data[i].second] = cnt;
134135
}

0 commit comments

Comments
 (0)