-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Use (void) for empty function parameters #8002
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 |
b21437d
to
527ca4b
Compare
4791010
to
0668aab
Compare
12a0e8a
to
636be4d
Compare
f34a324
to
38bcdd9
Compare
The WEBP functions were removed in #8213, so it's just the one JPEG function now. |
What is the benefit of |
They technically have different meanings in C. |
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.