aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/midi/sf2load.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-10-13 07:00:43 -0700
committerChris Robinson <[email protected]>2014-10-13 07:00:43 -0700
commit84582ceb030794f67858bbae3efffb9865eae117 (patch)
treed9c629ae0fcdceb13191f33940154933c1c179de /Alc/midi/sf2load.c
parentf05a2b86cd59bd3827ce741dcc0da5ffdf2969e9 (diff)
Use more appropriate size types
Diffstat (limited to 'Alc/midi/sf2load.c')
-rw-r--r--Alc/midi/sf2load.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Alc/midi/sf2load.c b/Alc/midi/sf2load.c
index 0975d2a4..a4c5d36d 100644
--- a/Alc/midi/sf2load.c
+++ b/Alc/midi/sf2load.c
@@ -949,15 +949,15 @@ static void processInstrument(ALfontsound ***sounds, ALsizei *sounds_size, ALCco
GenModList_Destruct(&gzone);
}
-static size_t printStringChunk(Reader *stream, const RiffHdr *chnk, const char *title)
+static ALuint printStringChunk(Reader *stream, const RiffHdr *chnk, const char *title)
{
- size_t len = 0;
+ ALuint len = 0;
if(chnk->mSize == 0 || (chnk->mSize&1))
ERR("Invalid "FOURCCFMT" size: %d\n", FOURCCARGS(chnk->mCode), chnk->mSize);
else
{
char *str = calloc(1, chnk->mSize+1);
- len = Reader_read(stream, str, chnk->mSize);
+ len = (ALuint)Reader_read(stream, str, chnk->mSize);
TRACE("%s: %s\n", title, str);
free(str);
@@ -1112,7 +1112,7 @@ ALboolean loadSf2(Reader *stream, ALsoundfont *soundfont, ALCcontext *context)
ptr = buffer->data;
if(IS_LITTLE_ENDIAN)
- smpl.mSize -= Reader_read(stream, ptr, smpl.mSize);
+ smpl.mSize -= (ALuint)Reader_read(stream, ptr, smpl.mSize);
else
{
ALuint total = 0;
@@ -1122,7 +1122,7 @@ ALboolean loadSf2(Reader *stream, ALsoundfont *soundfont, ALCcontext *context)
ALuint todo = minu(smpl.mSize-total, sizeof(buf));
ALuint i;
- smpl.mSize -= Reader_read(stream, buf, todo);
+ smpl.mSize -= (ALuint)Reader_read(stream, buf, todo);
for(i = 0;i < todo;i++)
ptr[total+i] = buf[i^1];