diff --git a/vibrator/cs40l26/Vibrator.cpp b/vibrator/cs40l26/Vibrator.cpp index 7ccaad8..e4157c9 100644 --- a/vibrator/cs40l26/Vibrator.cpp +++ b/vibrator/cs40l26/Vibrator.cpp @@ -837,8 +837,11 @@ void Vibrator::createPwleMaxLevelLimitMap() { pwleMaxLevelLimitMapIdx = (itr0->first - PWLE_FREQUENCY_MIN_HZ) / PWLE_FREQUENCY_RESOLUTION_HZ; + // FixLater: avoid floating point loop counters + // NOLINTBEGIN(clang-analyzer-security.FloatLoopCounter,cert-flp30-c) for (float xp = x0; xp < (x1 + PWLE_FREQUENCY_RESOLUTION_HZ); xp += PWLE_FREQUENCY_RESOLUTION_HZ) { + // NOLINTEND(clang-analyzer-security.FloatLoopCounter,cert-flp30-c) float yp = y0 + ratioOfXY * (xp - x0); pwleMaxLevelLimitMap[pwleMaxLevelLimitMapIdx++] = yp;