Pragma to ignore -Waggressive-loop-optimizations on Linux ARM64

This commit is contained in:
Andrey Senyaev 2022-07-14 11:17:38 +03:00
parent afe1c70f2d
commit d2b1e38207

View File

@ -829,10 +829,14 @@ else // CV_8U
v_pack_store(dst + k, __pack01); v_pack_store(dst + k, __pack01);
} }
#endif #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++ ) for( ; k < len; k++ )
{ {
dst[k] = saturate_cast<uchar>(rawDst[k]*nrm2); dst[k] = saturate_cast<uchar>(rawDst[k]*nrm2);
} }
#pragma GCC diagnostic pop
} }
#else #else
float* dst = dstMat.ptr<float>(row); float* dst = dstMat.ptr<float>(row);