all repos — mgba @ 53515b41cdfab0b5f9dcaff97c03b1495d24603a

mGBA Game Boy Advance Emulator

Fix warnings in CircleBuffer
Jeffrey Pfau jeffrey@endrift.com
Tue, 05 Nov 2013 00:44:11 -0800
commit

53515b41cdfab0b5f9dcaff97c03b1495d24603a

parent

2c826e208c9e194d22c657e70d95dfc1008d18de

1 files changed, 4 insertions(+), 4 deletions(-)

jump to
M src/util/circle-buffer.csrc/util/circle-buffer.c

@@ -27,7 +27,7 @@ return 0;

} *data = value; ++data; - ptrdiff_t size = (int8_t*) data - (int8_t*) buffer->data; + size_t size = (int8_t*) data - (int8_t*) buffer->data; if (size < buffer->capacity) { buffer->writePtr = data; } else {

@@ -44,7 +44,7 @@ return 0;

} *data = value; ++data; - ptrdiff_t size = (int8_t*) data - (int8_t*) buffer->data; + size_t size = (int8_t*) data - (int8_t*) buffer->data; if (size < buffer->capacity) { buffer->writePtr = data; } else {

@@ -61,7 +61,7 @@ return 0;

} *value = *data; ++data; - ptrdiff_t size = (int8_t*) data - (int8_t*) buffer->data; + size_t size = (int8_t*) data - (int8_t*) buffer->data; if (size < buffer->capacity) { buffer->readPtr = data; } else {

@@ -78,7 +78,7 @@ return 0;

} *value = *data; ++data; - ptrdiff_t size = (int8_t*) data - (int8_t*) buffer->data; + size_t size = (int8_t*) data - (int8_t*) buffer->data; if (size < buffer->capacity) { buffer->readPtr = data; } else {