Skip to content

fix -Wreturn-type and -Wstrict-prototypes in gd configure #12328

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

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

morrisonlevi
Copy link
Contributor

This kind of thing is why -Werror is enabled late, but in this case, I don't see any reason why we shouldn't just fix it. As C23 approaches, I expect more and more compilers to care about -Wstrict-prototypes and possibly even turn it to an error by default.

This kind of thing is why -Werror is enabled late, but in this case,
I don't see any reason why we shouldn't just fix it.
@Girgias
Copy link
Member

Girgias commented Sep 29, 2023

I don't think GD can be compiled with -Wstrict-prototypes anyway, as some of the function pointers used need to be totally variadic as the number of parameters is not consistent.

Or is that a different warning?

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the general comment, this looks sensible to me

@morrisonlevi
Copy link
Contributor Author

I hit this when using some other flag combinations because I didn't even get through the configure stage. I'm not sure about the gd prototype stuff, but this failure is in a random config.m4 check written ages ago.

@morrisonlevi
Copy link
Contributor Author

Fun, there's a segmentation fault in ext/oci8/tests/conn_attr_4.phpt: https://github.com/php/php-src/actions/runs/6358055629/job/17269921241?pr=12328

Of course, there's no way this is the fault of this PR. Is there someone specifically I should ping?

@nielsdos
Copy link
Member

@morrisonlevi That was due to a bad commit in 8.3 that's been reverted in the meantime. Rebasing your PR should fix it.

@morrisonlevi morrisonlevi merged commit 5d6c5d6 into php:PHP-8.3 Oct 2, 2023
@morrisonlevi morrisonlevi deleted the levi/gd-config branch October 2, 2023 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants