MLECO-1868: Code static analyzer warnings fixes
Signed-off-by: alexander <alexander.efremov@arm.com>
Change-Id: Ie423e9cad3fabec6ab077ded7236813fe4933dea
diff --git a/source/application/main/PlatformMath.cc b/source/application/main/PlatformMath.cc
index a9f5049..9d18151 100644
--- a/source/application/main/PlatformMath.cc
+++ b/source/application/main/PlatformMath.cc
@@ -121,7 +121,7 @@
float sumReal = 0, sumImag = 0;
for (int t = 0; t < inputLength; t++) {
- float angle = 2 * M_PI * t * k / inputLength;
+ auto angle = static_cast<float>(2 * M_PI * t * k / inputLength);
sumReal += input[t] * cosf(angle);
sumImag += -input[t] * sinf(angle);
}
@@ -147,7 +147,7 @@
output.size());
#else /* ARM_DSP_AVAILABLE */
for (auto in = input.begin(), out = output.begin();
- in != input.end(); ++in, ++out) {
+ in != input.end() && out != output.end(); ++in, ++out) {
*out = logf(*in);
}
#endif /* ARM_DSP_AVAILABLE */