ref: 309f665619968cee32bbab4a996cea86121ed76f
parent: f6791e04f7be1ba29150407093d5afa65da51dac
author: Chris Moeller <kode54@gmail.com>
date: Wed Jun 29 17:56:40 EDT 2016
Clean up more warnings.
--- a/src/helpers/riff.c
+++ b/src/helpers/riff.c
@@ -13,7 +13,7 @@
if ( dumbfile_seek(f, offset, DFS_SEEK_SET) ) return 0;
if ( dumbfile_mgetl(f) != DUMB_ID('R','I','F','F') ) return 0;
- stream_size = dumbfile_igetl(f);
+ stream_size = (int) dumbfile_igetl(f);
if ( stream_size + 8 > size ) return 0;
if ( stream_size < 4 ) return 0;
@@ -20,7 +20,7 @@
stream = (struct riff *) malloc( sizeof( struct riff ) );
if ( ! stream ) return 0;
- stream->type = dumbfile_mgetl(f);
+ stream->type = (int) dumbfile_mgetl(f);
stream->chunk_count = 0;
stream->chunks = 0;
@@ -33,8 +33,8 @@
stream->chunks = ( struct riff_chunk * ) realloc( stream->chunks, ( stream->chunk_count + 1 ) * sizeof( struct riff_chunk ) );
if ( ! stream->chunks ) break;
chunk = stream->chunks + stream->chunk_count;
- chunk->type = dumbfile_mgetl(f);
- chunk->size = dumbfile_igetl(f);
+ chunk->type = (int) dumbfile_mgetl(f);
+ chunk->size = (int) dumbfile_igetl(f);
chunk->offset = dumbfile_pos(f);
stream_size -= 8;
if ( stream_size < chunk->size ) break;
--- a/src/it/readasy.c
+++ b/src/it/readasy.c
@@ -88,7 +88,7 @@
++entry;
}
- pattern->n_entries = entry - pattern->entry;
+ pattern->n_entries = (int)(entry - pattern->entry);
return 0;
}
--- a/src/it/readmtm.c
+++ b/src/it/readmtm.c
@@ -87,7 +87,7 @@
entry++;
}
- pattern->n_entries = entry - pattern->entry;
+ pattern->n_entries = (int)(entry - pattern->entry);
return 0;
}
@@ -330,7 +330,7 @@
if (!sigdata->song_message) goto error_fc;
for (m = 0, n = 0; n <= o; n += 40) {
- int p = strlen_max(&comment[n], 40);
+ int p = (int) strlen_max(&comment[n], 40);
if (p) {
memcpy(sigdata->song_message + m, &comment[n], p);
m += p;
--- a/src/it/readstm.c
+++ b/src/it/readstm.c
@@ -181,7 +181,7 @@
++entry;
}
- pattern->n_entries = entry - pattern->entry;
+ pattern->n_entries = (int)(entry - pattern->entry);
return 0;
}