From b0f46c2076a861ced63b193fffebfb8f0f5d0c4c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 8 Dec 2008 23:23:28 +0100 Subject: [PATCH] osx: don't use void pointer in arithmetic Cast AudioBuffer.mData to a "unsigned char*" before adding "curpos". This fixes a gcc warning. --- src/output/osx_plugin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/output/osx_plugin.c b/src/output/osx_plugin.c index b368ed8a1..58a4f1e17 100644 --- a/src/output/osx_plugin.c +++ b/src/output/osx_plugin.c @@ -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;