From 21bfe88a30ef02c4a1479e48ead372b0dc391e26 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Thu, 27 Nov 2014 21:55:24 +0200 Subject: libdivecomputer.c: reduce the scope of 'i' in sample_cb() Silences a warning about an unused variable. Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- libdivecomputer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libdivecomputer.c') 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(" ", 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("\n"); break; -- cgit v1.2.3-70-g09d2