From e5d76593fc6be594f726d889273d9b9f730c3b5b Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 23 Apr 2024 22:07:09 +0800 Subject: [PATCH] uemis: pass dive pointer as dive pointer, not void pointer This was very obscure: the function that parses into a struct dive was passed a void-pointer instead of a struct dive-pointer. Why? Just pass the correct type. Signed-off-by: Berthold Stoeger --- core/uemis.c | 3 +-- core/uemis.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/uemis.c b/core/uemis.c index b5d6d006c..c50ecd7a9 100644 --- a/core/uemis.c +++ b/core/uemis.c @@ -290,14 +290,13 @@ static void uemis_event(struct dive *dive, struct divecomputer *dc, struct sampl /* * parse uemis base64 data blob into struct dive */ -void uemis_parse_divelog_binary(char *base64, void *datap) +void uemis_parse_divelog_binary(char *base64, struct dive *dive) { int datalen; int i; uint8_t *data; struct sample *sample = NULL; uemis_sample_t *u_sample; - struct dive *dive = datap; struct divecomputer *dc = &dive->dc; int template, gasoffset; uint8_t active = 0; diff --git a/core/uemis.h b/core/uemis.h index 9c0a70995..6c5840fb2 100644 --- a/core/uemis.h +++ b/core/uemis.h @@ -13,7 +13,7 @@ extern "C" { #endif -void uemis_parse_divelog_binary(char *base64, void *divep); +void uemis_parse_divelog_binary(char *base64, struct dive *dive); int uemis_get_weight_unit(uint32_t diveid); void uemis_mark_divelocation(int diveid, int divespot, struct dive_site *ds); void uemis_set_divelocation(int divespot, char *text, double longitude, double latitude);