Merge pull request #22246 from asenyaev:asen/fix_warning_lnx_arm64_3.4

This commit is contained in:
Alexander Alekhin 2022-07-14 11:09:04 +00:00
commit 1377f0147e

View File

@ -829,10 +829,14 @@ else // CV_8U
v_pack_store(dst + k, __pack01);
}
#endif
// avoid warning "iteration 7 invokes undefined behavior" on Linux ARM64
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Waggressive-loop-optimizations"
for( ; k < len; k++ )
{
dst[k] = saturate_cast<uchar>(rawDst[k]*nrm2);
}
#pragma GCC diagnostic pop
}
#else
float* dst = dstMat.ptr<float>(row);