From 0b2d22494c649205442c09318ae7503c818b22d2 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 19 Dec 2017 23:35:57 +0100 Subject: Fix use of uninitialized variable in core/profile.c last_ceiling was used before initialization in the first iteration of the loop in calculate_deco_information(). Signed-off-by: Berthold Stoeger --- core/profile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/profile.c b/core/profile.c index d95ef1a0a..327956cd5 100644 --- a/core/profile.c +++ b/core/profile.c @@ -1007,7 +1007,7 @@ void calculate_deco_information(struct deco_state *ds, struct deco_state *planne /* For VPM-B outside the planner, iterate until deco time converges (usually one or two iterations after the initial) * Set maximum number of iterations to 10 just in case */ while ((abs(prev_deco_time - ds->deco_time) >= 30) && (count_iteration < 10)) { - int last_ndl_tts_calc_time = 0, first_ceiling = 0, current_ceiling, last_ceiling, final_tts = 0 , time_clear_ceiling = 0; + int last_ndl_tts_calc_time = 0, first_ceiling = 0, current_ceiling, last_ceiling = 0, final_tts = 0 , time_clear_ceiling = 0; if (decoMode() == VPMB) ds->first_ceiling_pressure.mbar = depth_to_mbar(first_ceiling, dive); struct gasmix *gasmix = NULL; -- cgit v1.2.3-70-g09d2