osx: don't use void pointer in arithmetic

Cast AudioBuffer.mData to a "unsigned char*" before adding "curpos".
This fixes a gcc warning.
This commit is contained in:
Max Kellermann 2008-12-08 23:23:28 +01:00
parent 87f6f57bf6
commit b0f46c2076
1 changed files with 2 additions and 2 deletions

View File

@ -183,13 +183,13 @@ osx_render(void *vdata,
if (od->pos + bytesToCopy > od->bufferSize) {
size_t bytes = od->bufferSize - od->pos;
memcpy(buffer->mData + curpos, od->buffer + od->pos, bytes);
memcpy((unsigned char*)buffer->mData + curpos, od->buffer + od->pos, bytes);
od->pos = 0;
curpos += bytes;
bytesToCopy -= bytes;
}
memcpy(buffer->mData + curpos, od->buffer + od->pos, bytesToCopy);
memcpy((unsigned char*)buffer->mData + curpos, od->buffer + od->pos, bytesToCopy);
od->pos += bytesToCopy;
curpos += bytesToCopy;