From 12c83b744edd9abe0b8e0f1ca7577871be95dbca Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 1 Oct 2015 20:45:51 -0400 Subject: 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 --- planner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3-70-g09d2