diff --git a/src/supernovae/set_kick_velocity.c b/src/supernovae/set_kick_velocity.c
index a48cacbe0c419cbab655be5fce5558b88bad7b2a..d0c19106d5ab1e5e05bf8736d40917c8b478117a 100644
--- a/src/supernovae/set_kick_velocity.c
+++ b/src/supernovae/set_kick_velocity.c
@@ -216,8 +216,7 @@ void set_kick_velocity(struct stardata_t * const stardata,
 #endif
 
 #if defined TEST_KICK_SPEED_DISTRIBUTION || defined TEST_KICK_DIRECTIONS
-        int il;
-        for(il=0;il<NTESTS;il++)
+        for(int il=0;il<NTESTS;il++)
         {
 #endif
             /*