diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-07-19 06:14:18 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-07-19 06:21:23 -0700 |
commit | 0e865ef4e78e30b0294e6bb5d2ebab75cf545033 (patch) | |
tree | a79ca266db2612d23bf69d2620c64580c13b4f3e /core | |
parent | a38d440d5ea525c0b93d58668da0f8e65f0e76ea (diff) | |
download | subsurface-0e865ef4e78e30b0294e6bb5d2ebab75cf545033.tar.gz |
Move variable into the code block it is used in
Avoids an "unused variable" warning.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/downloadfromdcthread.cpp | 4 |
1 files changed, 1 insertions, 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; |