summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-25 16:17:55 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-25 16:28:37 -0800
commit3f261f56f3401695d0577598624dddc09243b371 (patch)
tree65826e8fb34827a2bb4a417ef5595023610d595c /profile.c
parent3ab27e65e8086199d6d23f0bd5d6f5a22b37a349 (diff)
downloadsubsurface-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.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/profile.c b/profile.c
index 0963b5c76..21fa59857 100644
--- a/profile.c
+++ b/profile.c
@@ -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);