summaryrefslogtreecommitdiffstats
path: root/planner.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-01 20:45:51 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-01 21:11:59 -0400
commit12c83b744edd9abe0b8e0f1ca7577871be95dbca (patch)
tree01ad4db954267eae5e6b27b44253ec9294d45d68 /planner.c
parent5a6aaec4906a68dac3ce6f845b939ade58be53ab (diff)
downloadsubsurface-12c83b744edd9abe0b8e0f1ca7577871be95dbca.tar.gz
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>
Diffstat (limited to 'planner.c')
-rw-r--r--planner.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/planner.c b/planner.c
index e3d14ca07..8964bb48b 100644
--- a/planner.c
+++ b/planner.c
@@ -540,7 +540,7 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool
struct divedatapoint *dp = diveplan->dp;
bool gaschange_after = !plan_verbatim;
bool gaschange_before;
- bool lastentered;
+ bool lastentered = true;
struct divedatapoint *nextdp = NULL;
plan_verbatim = prefs.verbatim_plan;