Skip to content

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

Merged
morrisonlevi merged 1 commit into
php:PHP-8.3from
morrisonlevi:levi/gd-config
Oct 2, 2023
Merged

morrisonlevi merged 1 commit into
php:PHP-8.3from
morrisonlevi:levi/gd-config

Conversation

@morrisonlevi

Copy link
Copy Markdown
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

Girgias commented Sep 29, 2023

Copy link
Copy Markdown
Member

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?

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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?

@ndossche

Copy link
Copy Markdown
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