-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix gcc-14 Wcalloc-transposed-args warnings #13818
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
Conversation
gcc-14 and later warns of inverted arguments in calloc or calloc-like __alloc_size__ annotated functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right! Thanks for fixing this.
Can you please target the PR to PHP-8.3. |
Mine to share why ? despite the warnings the resulting allocations will have the same size..this is just to shut up the compiler..all of this assuming all the wrappers used by ecalloc multiply both values..(which seems to be the case on a quick glance) |
Warnings tells what something is wrong. Actually, they caught bugs that might cause different alignment of allocated memory. |
@crrodriguez Looks like something went wrong when changing branches, you should typically rebase instead of merge to fix up your branch after changing the base branch. |
Yes, please if you can. |
Merged manually, thanks for the patch! |
gcc-14 and later warns of inverted arguments in calloc or calloc-like __alloc_size__ annotated functions. Closes phpGH-13818.
gcc-14 and later warns of inverted arguments in calloc or calloc-like alloc_size annotated functions.