Fix warning

Commit 9771255919 introduces a compiler warning due to mismatched
pointer types. Fixed here.

Reported-by: Stefan Fuchs <sfuchs@gmx.de>
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
Jan Mulder 2017-11-10 10:24:32 +01:00
parent dd510fcea7
commit f1437cfec7

View file

@ -610,6 +610,11 @@ static void get_uint8(char *buffer, uint8_t *i)
*i = atoi(buffer);
}
static void get_uint16(char *buffer, uint16_t *i)
{
*i = atoi(buffer);
}
static void get_bearing(char *buffer, bearing_t *bearing)
{
bearing->degrees = atoi(buffer);
@ -990,7 +995,7 @@ static void try_to_fill_sample(struct sample *sample, const char *name, char *bu
return;
if (MATCH("stopdepth.sample", depth, &sample->stopdepth))
return;
if (MATCH("cns.sample", get_uint8, &sample->cns))
if (MATCH("cns.sample", get_uint16, &sample->cns))
return;
if (MATCH("rbt.sample", sampletime, &sample->rbt))
return;