summaryrefslogtreecommitdiffstats
path: root/core/profile.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2017-12-19 23:35:57 +0100
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-12-21 00:04:30 +0100
commit0b2d22494c649205442c09318ae7503c818b22d2 (patch)
tree0e35e71cb3d65bcee2ff574e3605757a661766eb /core/profile.c
parent3c346bb341854897628117def6f3415ee5740444 (diff)
downloadsubsurface-0b2d22494c649205442c09318ae7503c818b22d2.tar.gz
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 <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/profile.c')
-rw-r--r--core/profile.c2
1 files changed, 1 insertions, 1 deletions
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;