mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 03:00:14 +08:00
fix warning in Clang 10
This commit is contained in:
parent
a2edf4d929
commit
2146bbb7bd
4
3rdparty/carotene/src/div.cpp
vendored
4
3rdparty/carotene/src/div.cpp
vendored
@ -157,8 +157,8 @@ void div(const Size2D &size,
|
|||||||
|
|
||||||
if (scale == 0.0f ||
|
if (scale == 0.0f ||
|
||||||
(std::numeric_limits<T>::is_integer &&
|
(std::numeric_limits<T>::is_integer &&
|
||||||
(scale * std::numeric_limits<T>::max()) < 1.0f &&
|
(scale * static_cast<float>(std::numeric_limits<T>::max())) < 1.0f &&
|
||||||
(scale * std::numeric_limits<T>::max()) > -1.0f))
|
(scale * static_cast<float>(std::numeric_limits<T>::max())) > -1.0f))
|
||||||
{
|
{
|
||||||
for (size_t y = 0; y < size.height; ++y)
|
for (size_t y = 0; y < size.height; ++y)
|
||||||
{
|
{
|
||||||
|
2
3rdparty/openexr/IlmImf/ImfConvert.cpp
vendored
2
3rdparty/openexr/IlmImf/ImfConvert.cpp
vendored
@ -107,7 +107,7 @@ floatToUint (float f)
|
|||||||
if (isNegative (f) || isNan (f))
|
if (isNegative (f) || isNan (f))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (isInfinity (f) || f > UINT_MAX)
|
if (isInfinity (f) || f > (float)UINT_MAX)
|
||||||
return UINT_MAX;
|
return UINT_MAX;
|
||||||
|
|
||||||
return (unsigned int) f;
|
return (unsigned int) f;
|
||||||
|
2
3rdparty/openjpeg/openjp2/j2k.c
vendored
2
3rdparty/openjpeg/openjp2/j2k.c
vendored
@ -7796,7 +7796,7 @@ OPJ_BOOL opj_j2k_setup_encoder(opj_j2k_t *p_j2k,
|
|||||||
image->comps[0].h * image->comps[0].prec) /
|
image->comps[0].h * image->comps[0].prec) /
|
||||||
((double)parameters->tcp_rates[parameters->tcp_numlayers - 1] * 8 *
|
((double)parameters->tcp_rates[parameters->tcp_numlayers - 1] * 8 *
|
||||||
image->comps[0].dx * image->comps[0].dy));
|
image->comps[0].dx * image->comps[0].dy));
|
||||||
if (temp_size > INT_MAX) {
|
if (temp_size > (OPJ_FLOAT32)INT_MAX) {
|
||||||
parameters->max_cs_size = INT_MAX;
|
parameters->max_cs_size = INT_MAX;
|
||||||
} else {
|
} else {
|
||||||
parameters->max_cs_size = (int) floor(temp_size);
|
parameters->max_cs_size = (int) floor(temp_size);
|
||||||
|
2
3rdparty/openjpeg/openjp2/tcd.c
vendored
2
3rdparty/openjpeg/openjp2/tcd.c
vendored
@ -2262,7 +2262,7 @@ static OPJ_BOOL opj_tcd_dc_level_shift_decode(opj_tcd_t *p_tcd)
|
|||||||
for (j = 0; j < l_height; ++j) {
|
for (j = 0; j < l_height; ++j) {
|
||||||
for (i = 0; i < l_width; ++i) {
|
for (i = 0; i < l_width; ++i) {
|
||||||
OPJ_FLOAT32 l_value = *((OPJ_FLOAT32 *) l_current_ptr);
|
OPJ_FLOAT32 l_value = *((OPJ_FLOAT32 *) l_current_ptr);
|
||||||
if (l_value > INT_MAX) {
|
if (l_value > (OPJ_FLOAT32)INT_MAX) {
|
||||||
*l_current_ptr = l_max;
|
*l_current_ptr = l_max;
|
||||||
} else if (l_value < INT_MIN) {
|
} else if (l_value < INT_MIN) {
|
||||||
*l_current_ptr = l_min;
|
*l_current_ptr = l_min;
|
||||||
|
Loading…
Reference in New Issue
Block a user