summaryrefslogtreecommitdiffstats
path: root/src/file_mid.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2014-11-15 12:29:48 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2014-11-15 12:29:48 +0100
commit5ed8822f2b3cc95bf7f9bda45bf7b57e8a693f6d (patch)
tree69fd55db22dbc9b3d4d7ebc6aba46203a9c82b0e /src/file_mid.c
parent17040353bc6dc9d3ac701037fe90ce69382fb49f (diff)
Turn off various signed/unsigned comparaison warnings
Diffstat (limited to 'src/file_mid.c')
-rw-r--r--src/file_mid.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/file_mid.c b/src/file_mid.c
index 2c45861..2ea72d6 100644
--- a/src/file_mid.c
+++ b/src/file_mid.c
@@ -60,6 +60,7 @@ static void file_check_midi(file_recovery_t *file_recovery)
const uint64_t fs_org=file_recovery->file_size;
struct midi_header hdr;
unsigned int i;
+ unsigned int tracks;
uint64_t fs=4+4+6;
file_recovery->file_size=0;
if(
@@ -70,7 +71,8 @@ static void file_check_midi(file_recovery_t *file_recovery)
#endif
fread(&hdr, sizeof(hdr), 1, file_recovery->handle) != 1)
return ;
- for(i=0; i<be16(hdr.tracks); i++)
+ tracks=be16(hdr.tracks);
+ for(i=0; i<tracks; i++)
{
struct midi_header track;
#ifdef DEBUG_MIDI