From e316e7c4b0b20976acefc8da5bee4c427f12c8bf Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 3 Apr 2025 13:39:01 +1000 Subject: [PATCH] tools: disable clang-tidy warning about using floats for loop counters Really doesn't matter here. Part-of: --- tools/ptraccel-debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ptraccel-debug.c b/tools/ptraccel-debug.c index f763e3ba..c8080980 100644 --- a/tools/ptraccel-debug.c +++ b/tools/ptraccel-debug.c @@ -51,7 +51,7 @@ print_ptraccel_deltas(struct motion_filter *filter, double step) printf("#\n"); /* Accel flattens out after 15 and becomes linear */ - for (i = 0.0; i < 15.0; i += step) { + for (i = 0.0; i < 15.0; i += step) { // NOLINT: security.FloatLoopCounter motion.x = i; motion.y = 0; time += us(12500); /* pretend 80Hz data */ @@ -162,7 +162,7 @@ print_accel_func(struct motion_filter *filter, printf("# plot \"gnuplot.data\" using 1:2 title 'accel factor'\n"); printf("#\n"); printf("# data: velocity(mm/s) factor velocity(units/us) velocity(units/ms)\n"); - for (mmps = 0.0; mmps < 1000.0; mmps += 1) { + for (mmps = 0.0; mmps < 1000.0; mmps += 1) { // NOLINT: security.FloatLoopCounter double units_per_us = mmps_to_upus(mmps, dpi); double units_per_ms = units_per_us * 1000.0; double result = profile(filter, NULL, units_per_us, 0 /* time */);