Avoid possible uninitialized memory read

This looks like possibly a false positive in the Coverity scan, but we can
always assume that the first point of the dive plan has been entered by
the user.

Coverity CID 1325285

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-10-01 20:45:51 -04:00
parent 5a6aaec490
commit 12c83b744e

View file

@ -540,7 +540,7 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool
struct divedatapoint *dp = diveplan->dp; struct divedatapoint *dp = diveplan->dp;
bool gaschange_after = !plan_verbatim; bool gaschange_after = !plan_verbatim;
bool gaschange_before; bool gaschange_before;
bool lastentered; bool lastentered = true;
struct divedatapoint *nextdp = NULL; struct divedatapoint *nextdp = NULL;
plan_verbatim = prefs.verbatim_plan; plan_verbatim = prefs.verbatim_plan;