From 1dab8800e5f0b768b72892930314c8ad63b2b568 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 9 Mar 2016 18:25:30 -0800 Subject: Clean up signedness confusion in libdivecomputer.c Signed-off-by: Dirk Hohndel --- subsurface-core/libdivecomputer.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/subsurface-core/libdivecomputer.c b/subsurface-core/libdivecomputer.c index 5587590b8..549b894ce 100644 --- a/subsurface-core/libdivecomputer.c +++ b/subsurface-core/libdivecomputer.c @@ -71,13 +71,14 @@ static dc_status_t create_parser(device_data_t *devdata, dc_parser_t **parser) return dc_parser_new(parser, devdata->device); } -static int parse_gasmixes(device_data_t *devdata, struct dive *dive, dc_parser_t *parser, int ngases) +static int parse_gasmixes(device_data_t *devdata, struct dive *dive, dc_parser_t *parser, unsigned int ngases) { static bool shown_warning = false; - int i, rc; + unsigned int i; + int rc; #if DC_VERSION_CHECK(0, 5, 0) && defined(DC_GASMIX_UNKNOWN) - int ntanks = 0; + unsigned int ntanks = 0; rc = dc_parser_get_field(parser, DC_FIELD_TANK_COUNT, 0, &ntanks); if (rc == DC_STATUS_SUCCESS) { if (ntanks && ntanks != ngases) { -- cgit v1.2.3-70-g09d2