aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Butyugin <dmbutyugin@google.com>2020-07-07 20:46:45 +0200
committerKevinOConnor <kevin@koconnor.net>2020-07-07 17:50:51 -0400
commit5dc0c8aac0c1469270779d399ecdd7dcdbd53247 (patch)
tree444774d96811891e6fffe2f005b91acb6b7dd807
parentcd8f250e84b8f1ae56eb8fc87d2c6fa623e14c98 (diff)
downloadkutter-5dc0c8aac0c1469270779d399ecdd7dcdbd53247.tar.gz
kutter-5dc0c8aac0c1469270779d399ecdd7dcdbd53247.tar.xz
kutter-5dc0c8aac0c1469270779d399ecdd7dcdbd53247.zip
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 <dmbutyugin@google.com>
-rw-r--r--klippy/chelper/kin_shaper.c3
1 files changed, 2 insertions, 1 deletions
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;