From 5dc0c8aac0c1469270779d399ecdd7dcdbd53247 Mon Sep 17 00:00:00 2001 From: Dmitry Butyugin Date: Tue, 7 Jul 2020 20:46:45 +0200 Subject: [PATCH] input_shaper: Fixed C module compilation on older gnu90 compilers For example, Raspbian GNU/Linux 8 (jessie) uses an old GCC version 4.9.2 which uses -std=gnu90 by default. Signed-off-by: Dmitry Butyugin --- klippy/chelper/kin_shaper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/klippy/chelper/kin_shaper.c b/klippy/chelper/kin_shaper.c index d79a9561..9dcf91a3 100644 --- a/klippy/chelper/kin_shaper.c +++ b/klippy/chelper/kin_shaper.c @@ -50,7 +50,8 @@ calc_position(struct move *m, int axis, double move_time , struct shaper_pulse *pulses, int n) { double res = 0.; - for (int i = 0; i < n; ++i) + int i; + for (i = 0; i < n; ++i) res += pulses[i].a * get_axis_position_across_moves( m, axis, move_time + pulses[i].t); return res;