Skip to content

Conversation

@Yay295
Copy link
Contributor

@Yay295 Yay295 commented Nov 27, 2022

This fixes

  src/_webp.c:494:5: warning: cast between incompatible function types from ‘PyObject * (*)(PyObject *)’ {aka ‘struct _object * (*)(struct _object *)’} to ‘void (*)(PyObject *)’ {aka ‘void (*)(struct _object *)’} [-Wcast-function-type]
    494 |     (destructor)_anim_encoder_dealloc, /*tp_dealloc*/
        |     ^

Or to put that a bit more clearly, the function type of the destructor functions should be void (*)(PyObject *) not PyObject * (*)(PyObject *).

@radarhere radarhere added the WebP label Nov 27, 2022
@radarhere radarhere changed the title Fix webp dealloc method definitions Fix WebP dealloc method definitions Nov 27, 2022
@radarhere
Copy link
Member

I'm having trouble finding that warning in our CI jobs. Can you find it in one of them and provide a link? If not, what environment are you on?

@Yay295
Copy link
Contributor Author

Yay295 commented Nov 28, 2022

Just running locally. I added -Wall -Wextra to my makefile.

@radarhere
Copy link
Member

radarhere commented Nov 28, 2022

Ok, running that on Linux generates the warning - https://github.com/radarhere/Pillow/actions/runs/3561838551/jobs/5983089664#step:7:2329

And your change here removes it.

@radarhere radarhere merged commit 0ec32a3 into python-pillow:main Nov 29, 2022
@Yay295 Yay295 deleted the patch-1 branch November 29, 2022 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants