diff options
-rw-r--r-- | gtk-gui.c | 3 | ||||
-rw-r--r-- | statistics.c | 1 | ||||
-rw-r--r-- | uemis-downloader.c | 2 | ||||
-rw-r--r-- | uemis.c | 5 |
4 files changed, 7 insertions, 4 deletions
@@ -1734,8 +1734,9 @@ void init_ui(int *argcp, char ***argvp) star_strings[4] = "**** "; star_strings[5] = "*****"; } +#if !GLIB_CHECK_VERSION(2,3,6) g_type_init(); - +#endif subsurface_open_conf(); load_preferences(); diff --git a/statistics.c b/statistics.c index a39799a08..502c06cb4 100644 --- a/statistics.c +++ b/statistics.c @@ -668,6 +668,7 @@ static void get_ranges(char *buffer, int size) } } } + len = strlen(buffer); if (first != last) { if (first + 1 == last) snprintf(buffer + len, size - len, ", %d", last); diff --git a/uemis-downloader.c b/uemis-downloader.c index c5113d95a..d33f08b8c 100644 --- a/uemis-downloader.c +++ b/uemis-downloader.c @@ -546,7 +546,7 @@ static void parse_divespot(char *buf) char *tag, *type, *val; char locationstring[1024] = ""; int divespot, len; - double latitude, longitude; + double latitude = 0.0, longitude = 0.0; if (strcmp(tp, "divespot")) @@ -288,7 +288,7 @@ void uemis_parse_divelog_binary(char *base64, void *datap) { int datalen; int i; uint8_t *data; - struct sample *sample; + struct sample *sample = NULL; uemis_sample_t *u_sample; struct dive *dive = datap; struct divecomputer *dc = &dive->dc; @@ -365,6 +365,7 @@ void uemis_parse_divelog_binary(char *base64, void *datap) { i += 0x25; u_sample++; } - dive->dc.duration.seconds = sample->time.seconds - 1; + if (sample) + dive->dc.duration.seconds = sample->time.seconds - 1; return; } |