mirror of
https://github.com/opencv/opencv.git
synced 2025-01-19 06:53:50 +08:00
Merge pull request #23120 from alalek:fixup_22246_2
This commit is contained in:
commit
974102bc7f
@ -807,11 +807,18 @@ if( dstMat.type() == CV_32F )
|
||||
__dst = v_min(v_max(v_cvt_f32(v_round(__dst * __nrm2)), __min), __max);
|
||||
v_store(dst + k, __dst);
|
||||
}
|
||||
#endif
|
||||
#if defined(__GNUC__) && __GNUC__ >= 9
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Waggressive-loop-optimizations" // iteration XX invokes undefined behavior
|
||||
#endif
|
||||
for( ; k < len; k++ )
|
||||
{
|
||||
dst[k] = saturate_cast<uchar>(rawDst[k]*nrm2);
|
||||
}
|
||||
#if defined(__GNUC__) && __GNUC__ >= 9
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
}
|
||||
else // CV_8U
|
||||
{
|
||||
@ -831,9 +838,8 @@ else // CV_8U
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__ >= 9
|
||||
// avoid warning "iteration 7 invokes undefined behavior" on Linux ARM64
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Waggressive-loop-optimizations"
|
||||
#pragma GCC diagnostic ignored "-Waggressive-loop-optimizations" // iteration XX invokes undefined behavior
|
||||
#endif
|
||||
for( ; k < len; k++ )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user