-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use (void) for empty function parameters #8002
base: main
Are you sure you want to change the base?
Conversation
Ah, it looks like the webp functions are like that to get rid of the warning. They should actually have two parameters to match the |
Can't you just use unnamed parameters to get rid of the warning? |
It looks like the solution in other places is just to cast it to the right type. |
What is the benefit of If this is the general agreement, then sure, go ahead - but to me, requiring casting is a step too far for just a style preference. |
Casting is already used for this reason quite a lot elsewhere already. By "other places" I meant "other places in Pillow"; I wasn't talking about other projects. Lines 530 to 536 in c250a44
https://github.com/search?q=repo%3Apython-pillow%2FPillow+%28PyCFunction%29&type=code |
None of those castings involve functions that have |
I just happened to notice that these are the only three C functions that don't take any arguments and use
()
instead of(void)
in their definition.