From 23e88391824385bf26e80ae570e52cca32738164 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 13 Jun 2020 10:36:38 +0200 Subject: download: don't warn on unknown gasmixes Apparently libdivecomputer can return DC_GASMIX_UNKNOWN when fetching tank info with dc_parser_get_field(parser, DC_FIELD_TANK, i, &tank); This caused emission of a warning, which was annoying users. Disable the warning in that case. Fixes #2866 Signed-off-by: Berthold Stoeger --- core/libdivecomputer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c index f2bc9df41..a99d15ae8 100644 --- a/core/libdivecomputer.c +++ b/core/libdivecomputer.c @@ -195,7 +195,7 @@ static int parse_gasmixes(device_data_t *devdata, struct dive *dive, dc_parser_t mbar_to_atm(cyl.type.workingpressure.mbar)); } } - if (tank.gasmix != i) { // we don't handle this, yet + if (tank.gasmix != DC_GASMIX_UNKNOWN && tank.gasmix != i) { // we don't handle this, yet shown_warning = true; report_error("gasmix %d for tank %d doesn't match", tank.gasmix, i); } -- cgit v1.2.3-70-g09d2