mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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 <dirk@hohndel.org>
This commit is contained in:
parent
7f32f930ef
commit
b1d1c88822
1 changed files with 3 additions and 3 deletions
|
@ -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 };
|
||||
|
|
Loading…
Add table
Reference in a new issue