summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Patrick Valsecchi <patrick@thus.ch>2013-10-03 11:36:46 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-10-03 11:37:14 -0700
commitab7d96c96f1a18e2c0e1e684586eac2f47a879dd (patch)
tree19eb059f345b9d5b6b65888361929ef6744dea7a
parent34a747deada3b1321f779cd032cd50be91aa322d (diff)
downloadsubsurface-ab7d96c96f1a18e2c0e1e684586eac2f47a879dd.tar.gz
Fix unitialized variable use
I ran subsurface with valgrind and it found a few errors. [Dirk Hohndel: split this out from a much bigger patch that is still under review] Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--profile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/profile.c b/profile.c
index 79d59f099..f71552eca 100644
--- a/profile.c
+++ b/profile.c
@@ -1372,6 +1372,7 @@ void compare_samples(struct plot_data *e1, struct plot_data *e2, char *buf, int
return;
}
count = 0;
+ avg_speed = 0;
max_speed = 0;
min_speed = INT_MAX;
@@ -1385,6 +1386,7 @@ void compare_samples(struct plot_data *e1, struct plot_data *e2, char *buf, int
last_sec = start->sec;
last_pressure = GET_PRESSURE(start);
+ data = start;
while (data != stop) {
data = start+count;
if (sum)