summaryrefslogtreecommitdiffstats
path: root/libdivecomputer.c
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2014-11-27 21:55:24 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-01 14:31:05 -0800
commit21bfe88a30ef02c4a1479e48ead372b0dc391e26 (patch)
treee50ff9911cc01107da5d1ca2effe06b31fc095f1 /libdivecomputer.c
parenta04be5a7e4b019afd4799f618f876eb803955204 (diff)
downloadsubsurface-21bfe88a30ef02c4a1479e48ead372b0dc391e26.tar.gz
libdivecomputer.c: reduce the scope of 'i' in sample_cb()
Silences a warning about an unused variable. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'libdivecomputer.c')
-rw-r--r--libdivecomputer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libdivecomputer.c b/libdivecomputer.c
index a288c3be5..4b2512626 100644
--- a/libdivecomputer.c
+++ b/libdivecomputer.c
@@ -153,7 +153,6 @@ static void handle_event(struct divecomputer *dc, struct sample *sample, dc_samp
void
sample_cb(dc_sample_type_t type, dc_sample_value_t value, void *userdata)
{
- int i;
unsigned int mm;
struct divecomputer *dc = userdata;
struct sample *sample;
@@ -214,7 +213,7 @@ sample_cb(dc_sample_type_t type, dc_sample_value_t value, void *userdata)
case DC_SAMPLE_VENDOR:
printf(" <vendor time='%u:%02u' type=\"%u\" size=\"%u\">", FRACTION(sample->time.seconds, 60),
value.vendor.type, value.vendor.size);
- for (i = 0; i < value.vendor.size; ++i)
+ for (int i = 0; i < value.vendor.size; ++i)
printf("%02X", ((unsigned char *)value.vendor.data)[i]);
printf("</vendor>\n");
break;