diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-01-25 16:17:55 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-01-25 16:28:37 -0800 |
commit | 3f261f56f3401695d0577598624dddc09243b371 (patch) | |
tree | 65826e8fb34827a2bb4a417ef5595023610d595c /profile.c | |
parent | 3ab27e65e8086199d6d23f0bd5d6f5a22b37a349 (diff) | |
download | subsurface-3f261f56f3401695d0577598624dddc09243b371.tar.gz |
Remove some unnecessary variable initializations
Not really bugs, just wasted. They clutter up the output of static
analysis with cppcheck.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r-- | profile.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -391,14 +391,14 @@ static void plot_one_event(struct graphics_context *gc, struct plot_info *pi, st unsigned int he = event->value >> 16; unsigned int o2 = event->value & 0xffff; if (he) { - snprintf(buffer, sizeof(buffer), "%s: (%d/%d)", + snprintf(buffer, sizeof(buffer), "%s: (%u/%u)", _(event->name), o2, he); } else { if (o2 == 21) snprintf(buffer, sizeof(buffer), "%s: %s", _(event->name), _("air")); else - snprintf(buffer, sizeof(buffer), "%s: %d%% %s", + snprintf(buffer, sizeof(buffer), "%s: %u%% %s", _(event->name), o2, _("O" UTF8_SUBSCRIPT_2)); } } else { @@ -1516,10 +1516,10 @@ static void check_gas_change_events(struct dive *dive, struct divecomputer *dc, static void calculate_max_limits(struct dive *dive, struct divecomputer *dc, struct graphics_context *gc) { struct plot_info *pi; - int maxdepth = 0; + int maxdepth; int maxtime = 0; int maxpressure = 0, minpressure = INT_MAX; - int mintemp = 0, maxtemp = 0; + int mintemp, maxtemp; int cyl; /* The plot-info is embedded in the graphics context */ @@ -1751,8 +1751,6 @@ static void populate_pressure_information(struct dive *dive, struct divecomputer for (i = 1; i < pi->nr; i++) { struct plot_data *entry = pi->entry + i; - entry = pi->entry + i; - /* discrete integration of pressure over time to get the SAC rate equivalent */ current->pressure_time += pressure_time(dive, entry-1, entry); |