Cleanup: compiler warnings

This commit is contained in:
Campbell Barton 2021-05-01 00:49:55 +10:00
parent 405c3b59e4
commit 75536b5a61
2 changed files with 4 additions and 4 deletions

View File

@ -644,7 +644,7 @@ PyObject *BPyGPUFrameBuffer_CreatePyObject(GPUFrameBuffer *fb, bool shared_refer
void **ref = GPU_framebuffer_py_reference_get(fb);
if (ref) {
/* Retrieve BPyGPUFrameBuffer reference. */
self = POINTER_OFFSET(ref, -offsetof(BPyGPUFrameBuffer, fb));
self = (BPyGPUFrameBuffer *)POINTER_OFFSET(ref, -offsetof(BPyGPUFrameBuffer, fb));
BLI_assert(self->fb == fb);
Py_INCREF(self);
return (PyObject *)self;
@ -661,7 +661,7 @@ PyObject *BPyGPUFrameBuffer_CreatePyObject(GPUFrameBuffer *fb, bool shared_refer
self->shared_reference = shared_reference;
BLI_assert(GPU_framebuffer_py_reference_get(fb) == NULL);
GPU_framebuffer_py_reference_set(fb, &self->fb);
GPU_framebuffer_py_reference_set(fb, (void **)&self->fb);
#endif
return (PyObject *)self;

View File

@ -604,7 +604,7 @@ PyObject *BPyGPUTexture_CreatePyObject(GPUTexture *tex, bool shared_reference)
void **ref = GPU_texture_py_reference_get(tex);
if (ref) {
/* Retrieve BPyGPUTexture reference. */
self = POINTER_OFFSET(ref, -offsetof(BPyGPUTexture, tex));
self = (BPyGPUTexture *)POINTER_OFFSET(ref, -offsetof(BPyGPUTexture, tex));
BLI_assert(self->tex == tex);
Py_INCREF(self);
return (PyObject *)self;
@ -619,7 +619,7 @@ PyObject *BPyGPUTexture_CreatePyObject(GPUTexture *tex, bool shared_reference)
#ifndef GPU_NO_USE_PY_REFERENCES
BLI_assert(GPU_texture_py_reference_get(tex) == NULL);
GPU_texture_py_reference_set(tex, &self->tex);
GPU_texture_py_reference_set(tex, (void **)&self->tex);
#endif
return (PyObject *)self;