mirror of https://github.com/mgba-emu/mgba.git
Fix warnings in CircleBuffer
This commit is contained in:
parent
2c826e208c
commit
53515b41cd
|
@ -27,7 +27,7 @@ int CircleBufferWrite8(struct CircleBuffer* buffer, int8_t value) {
|
||||||
}
|
}
|
||||||
*data = value;
|
*data = 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) {
|
if (size < buffer->capacity) {
|
||||||
buffer->writePtr = data;
|
buffer->writePtr = data;
|
||||||
} else {
|
} else {
|
||||||
|
@ -44,7 +44,7 @@ int CircleBufferWrite32(struct CircleBuffer* buffer, int32_t value) {
|
||||||
}
|
}
|
||||||
*data = value;
|
*data = 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) {
|
if (size < buffer->capacity) {
|
||||||
buffer->writePtr = data;
|
buffer->writePtr = data;
|
||||||
} else {
|
} else {
|
||||||
|
@ -61,7 +61,7 @@ int CircleBufferRead8(struct CircleBuffer* buffer, int8_t* value) {
|
||||||
}
|
}
|
||||||
*value = *data;
|
*value = *data;
|
||||||
++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) {
|
if (size < buffer->capacity) {
|
||||||
buffer->readPtr = data;
|
buffer->readPtr = data;
|
||||||
} else {
|
} else {
|
||||||
|
@ -78,7 +78,7 @@ int CircleBufferRead32(struct CircleBuffer* buffer, int32_t* value) {
|
||||||
}
|
}
|
||||||
*value = *data;
|
*value = *data;
|
||||||
++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) {
|
if (size < buffer->capacity) {
|
||||||
buffer->readPtr = data;
|
buffer->readPtr = data;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue