mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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>
This commit is contained in:
parent
a04be5a7e4
commit
21bfe88a30
1 changed files with 1 additions and 2 deletions
|
@ -153,7 +153,6 @@ static void handle_event(struct divecomputer *dc, struct sample *sample, dc_samp
|
||||||
void
|
void
|
||||||
sample_cb(dc_sample_type_t type, dc_sample_value_t value, void *userdata)
|
sample_cb(dc_sample_type_t type, dc_sample_value_t value, void *userdata)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
unsigned int mm;
|
unsigned int mm;
|
||||||
struct divecomputer *dc = userdata;
|
struct divecomputer *dc = userdata;
|
||||||
struct sample *sample;
|
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:
|
case DC_SAMPLE_VENDOR:
|
||||||
printf(" <vendor time='%u:%02u' type=\"%u\" size=\"%u\">", FRACTION(sample->time.seconds, 60),
|
printf(" <vendor time='%u:%02u' type=\"%u\" size=\"%u\">", FRACTION(sample->time.seconds, 60),
|
||||||
value.vendor.type, value.vendor.size);
|
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("%02X", ((unsigned char *)value.vendor.data)[i]);
|
||||||
printf("</vendor>\n");
|
printf("</vendor>\n");
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue