aboutsummaryrefslogtreecommitdiffstats
path: root/core/parse-xml.c
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2017-11-10 10:24:32 +0100
committerGravatar Jan Mulder <jlmulder@xs4all.nl>2017-11-10 10:31:19 +0100
commitf1437cfec7978929a09ff7b1f5ad3a013dd0c713 (patch)
tree43a3dbf5d3dbf6cca5591fdcbcf89935a54c4b76 /core/parse-xml.c
parentdd510fcea79b63d26f1009fe19f8440737a71bd0 (diff)
downloadsubsurface-f1437cfec7978929a09ff7b1f5ad3a013dd0c713.tar.gz
Fix warning
Commit 97712559192ca82d 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>
Diffstat (limited to 'core/parse-xml.c')
-rw-r--r--core/parse-xml.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/parse-xml.c b/core/parse-xml.c
index 9b5123ad5..49e477c0b 100644
--- a/core/parse-xml.c
+++ b/core/parse-xml.c
@@ -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;