Skip to content

Commit

Permalink
Remove unused variables and fix signed/unsigned mismatch
Browse files Browse the repository at this point in the history
The depth types are unsigned for dive plan datapoints.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
  • Loading branch information
dirkhh committed Apr 18, 2014
1 parent 72be826 commit d191f5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 3 additions & 3 deletions planner.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ double tissue_at_end(struct dive *dive, char **cached_datap)
{
struct divecomputer *dc;
struct sample *sample, *psample;
int i, j, t0, t1, gasidx, lastdepth;
int i, t0, t1, gasidx, lastdepth;
int o2, he;
double tissue_tolerance;

Expand Down Expand Up @@ -582,11 +582,11 @@ void plan(struct diveplan *diveplan, char **cached_datap, struct dive **divep, b
{
struct dive *dive;
struct sample *sample;
int wait_time, o2, he, po2;
int o2, he, po2;
int transitiontime, gi;
int current_cylinder;
unsigned int stopidx;
int depth, ceiling;
int depth;
double tissue_tolerance;
struct gaschanges *gaschanges = NULL;
int gaschangenr;
Expand Down
6 changes: 1 addition & 5 deletions qt-ui/diveplanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,9 +520,7 @@ void DivePlannerGraphics::drawProfile()
computedPoints.push_back(i);
plannerModel->removeSelectedPoints(computedPoints);

int lastdepth = 0;
int lasto2 = 0;
int lasthe = 0;
unsigned int lastdepth = 0;
for (dp = diveplan.dp; dp != NULL; dp = dp->next) {
if (dp->time == 0) // magic entry for available tank
continue;
Expand All @@ -538,8 +536,6 @@ void DivePlannerGraphics::drawProfile()
if (dp->depth == lastdepth || dp->o2 != dp->next->o2 || dp->he != dp->next->he)
plannerModel->addStop(dp->depth, dp->time, dp->o2, dp->he, 0, false);
lastdepth = dp->depth;
lasto2 = dp->o2;
lasthe = dp->he;
}
}
lastx = xpos;
Expand Down

0 comments on commit d191f5a

Please sign in to comment.