From 0e865ef4e78e30b0294e6bb5d2ebab75cf545033 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 19 Jul 2017 06:14:18 -0700 Subject: Move variable into the code block it is used in Avoids an "unused variable" warning. Signed-off-by: Dirk Hohndel --- core/downloadfromdcthread.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/downloadfromdcthread.cpp b/core/downloadfromdcthread.cpp index 7f4d78036..e6fa6db4a 100644 --- a/core/downloadfromdcthread.cpp +++ b/core/downloadfromdcthread.cpp @@ -108,7 +108,6 @@ void fill_computer_list() { dc_iterator_t *iterator = NULL; dc_descriptor_t *descriptor = NULL; - struct mydescriptor *mydescriptor; fill_supported_mobile_list(); @@ -144,8 +143,7 @@ void fill_computer_list() happens to match a data structure that is internal to libdivecomputer; this WILL BREAK if libdivecomputer changes the dc_descriptor struct... eventually the UEMIS code needs to move into libdivecomputer, I guess */ - - mydescriptor = (struct mydescriptor *)malloc(sizeof(struct mydescriptor)); + struct mydescriptor *mydescriptor = (struct mydescriptor *)malloc(sizeof(struct mydescriptor)); mydescriptor->vendor = "Uemis"; mydescriptor->product = "Zurich"; mydescriptor->type = DC_FAMILY_NULL; -- cgit v1.2.3-70-g09d2