Add explicit casts for the msvc C++ compiler.

This commit is contained in:
Jef Driesen 2016-09-26 19:59:18 +02:00
parent 53c75860a7
commit e7ceb96627

View File

@ -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;
}