diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-06-11 09:37:12 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-11 09:37:12 -0700 |
commit | b70c877b3ce56155107791e3c38a4c9c4d915dff (patch) | |
tree | abc5ad9a780af0b457fced7cafc8899064442614 | |
parent | b42df1dab67d2f90934e24f428475ae5f5f88e86 (diff) | |
download | subsurface-b70c877b3ce56155107791e3c38a4c9c4d915dff.tar.gz |
Deal with some uninitialized variable warnings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | planner.c | 6 | ||||
-rw-r--r-- | qt-ui/profile/divecartesianaxis.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
@@ -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", "<b>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()); } |