From b70c877b3ce56155107791e3c38a4c9c4d915dff Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 11 Jun 2014 09:37:12 -0700 Subject: Deal with some uninitialized variable warnings Signed-off-by: Dirk Hohndel --- planner.c | 6 +++--- qt-ui/profile/divecartesianaxis.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/planner.c b/planner.c index 5dcc0468e..b682bd5cd 100644 --- a/planner.c +++ b/planner.c @@ -119,7 +119,7 @@ int get_gasidx(struct dive *dive, struct gasmix *mix) double interpolate_transition(struct dive *dive, int t0, int t1, int d0, int d1, const struct gasmix *gasmix, int ppo2) { int j; - double tissue_tolerance; + double tissue_tolerance = 0.0; for (j = t0; j < t1; j++) { int depth = interpolate(d0, d1, j - t0, t1 - t0); @@ -518,7 +518,7 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool struct divedatapoint *dp = diveplan->dp; const char *empty = ""; bool gaschange = !plan_verbatim; - struct divedatapoint *nextdp; + struct divedatapoint *nextdp = NULL; disclaimer = translate("gettextFromC", "DISCLAIMER / WARNING: THIS IS A NEW IMPLEMENTATION OF THE BUHLMANN " "ALGORITHM AND A DIVE PLANNER IMPLEMENTION BASED ON THAT WHICH HAS " @@ -684,7 +684,7 @@ void plan(struct diveplan *diveplan, char **cached_datap, struct dive **divep, s int current_cylinder; unsigned int stopidx; int depth; - double tissue_tolerance; + double tissue_tolerance = 0.0; struct gaschanges *gaschanges = NULL; int gaschangenr; int *stoplevels = NULL; diff --git a/qt-ui/profile/divecartesianaxis.cpp b/qt-ui/profile/divecartesianaxis.cpp index d4ba92bbd..4c4f15bb2 100644 --- a/qt-ui/profile/divecartesianaxis.cpp +++ b/qt-ui/profile/divecartesianaxis.cpp @@ -159,7 +159,7 @@ void DiveCartesianAxis::updateTicks(color_indice_t color) } else if (orientation == LeftToRight) { begin = m.x1(); stepSize = (m.x2() - m.x1()); - } else if (orientation == RightToLeft) { + } else /* if (orientation == RightToLeft) */ { begin = m.x2(); stepSize = (m.x2() - m.x1()); } -- cgit v1.2.3-70-g09d2