From b1d1c8882207049af73f4dc4bc8ef071c97c881a Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 9 Mar 2014 21:12:13 -0700 Subject: Fix uninitialized variable s could be used without being set. Also convert the file to utf-8 - for some reason it was created as iso8859. Signed-off-by: Dirk Hohndel --- load-git.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/load-git.c b/load-git.c index 92f8dbc05..ad4a03294 100644 --- a/load-git.c +++ b/load-git.c @@ -401,7 +401,7 @@ static char *parse_sample_unit(struct sample *sample, double val, char *unit) end++; } - /* The units are "°C", "m" or "bar", so let's just look at the first character */ + /* The units are "°C", "m" or "bar", so let's just look at the first character */ switch (*unit) { case 'm': sample->depth.mm = rint(1000*val); @@ -440,7 +440,7 @@ static struct sample *new_sample(struct divecomputer *dc) static void sample_parser(char *line, struct divecomputer *dc) { - int m,s; + int m, s = 0; struct sample *sample = new_sample(dc); m = strtol(line, &line, 10); @@ -530,7 +530,7 @@ static void parse_event_keyvalue(void *_event, const char *key, const char *valu static void parse_dc_event(char *line, struct membuffer *str, void *_dc) { - int m, s; + int m, s = 0; const char *name; struct divecomputer *dc = _dc; struct event event = { 0 }; -- cgit v1.2.3-70-g09d2