From e7ceb96627188aaa16915786e82deb7f15284630 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Mon, 26 Sep 2016 19:59:18 +0200 Subject: [PATCH] Add explicit casts for the msvc C++ compiler. --- src/suunto_eonsteel_parser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/suunto_eonsteel_parser.c b/src/suunto_eonsteel_parser.c index 5bc2590..a2fa3ee 100644 --- a/src/suunto_eonsteel_parser.c +++ b/src/suunto_eonsteel_parser.c @@ -678,7 +678,7 @@ static const char *lookup_enum(const struct type_desc *desc, unsigned char value if (n != value) continue; - ret = malloc(end - begin + 1); + ret = (char *)malloc(end - begin + 1); if (!ret) break; @@ -1177,7 +1177,7 @@ static int add_gas_type(suunto_eonsteel_parser_t *eon, const struct type_desc *d else if (!strcasecmp(name, "Oxygen")) ; else if (!strcasecmp(name, "None")) - tankinfo = 0; + tankinfo = DC_TANKVOLUME_NONE; else if (strcasecmp(name, "Primary")) DEBUG(eon->base.context, "Unknown gas type %u (%s)", type, name); @@ -1344,7 +1344,7 @@ static int traverse_diving_fields(suunto_eonsteel_parser_t *eon, const struct ty } if (!strcmp(name, "DiveMode")) { - if (!strncmp(data, "CCR", 3)) { + if (!strncmp((const char *)data, "CCR", 3)) { eon->cache.divemode = DC_DIVEMODE_CC; eon->cache.initialized |= 1 << DC_FIELD_DIVEMODE; }