Skip to content
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

Declare func(void), fix two related errors #178

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

ppentchev
Copy link
Contributor

Hi,

Thanks for your continued work on alttab! What do you think about this change that fixes the build with GCC 15.x? (a non-urgent Debian bug was filed about that: https://bugs.debian.org/1096301)

In the C language, a function that accepts no arguments should be declared as func(void), not func(); the latter declares a function that may accept any number of arguments of any type.

The func() declarations hid two errors:

  • getOffendingModifiersMask() was invoked with an extra parameter (placed onto the stack by the caller and then ignored by the function)
  • pngReadToDrawable_test() was declared without its pngfile parameter

Thanks in advance for your time, and keep up the great work!

In the C language, a function that accepts no arguments should be
declared as func(void), not func(); the latter declares a function
that may accept any number of arguments of any type.

The func() declarations hid two errors:
- getOffendingModifiersMask() was invoked with an extra parameter
  (placed onto the stack by the caller and then ignored by the function)
- pngReadToDrawable_test() was declared without its `pngfile` parameter
@sagb
Copy link
Owner

sagb commented Feb 18, 2025

Thank you!

@sagb sagb merged commit bb7a1dd into sagb:master Feb 18, 2025
1 check passed
@ppentchev ppentchev deleted the pp-void-proto branch February 18, 2025 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants