Skip to content

posix: fix misuse of bool (invalid code in c23) #10577

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

Closed
wants to merge 1 commit into from

Conversation

crrodriguez
Copy link
Contributor

a bool pointer argument cannot take true or false but either &boolval or NULL.

ext/posix/posix.c:511:67: error: incompatible type for argument 3 of ‘zend_parse_arg_long’
511 | if (!zend_parse_arg_long(z_fd, &fd, /* is_null / false, / check_null / false, / arg_num */ 1)) {
| ^~~~~
| |
| _Bool
/home/crrodriguez/scm/php-src/Zend/zend_API.h:2160:86: note: expected ‘_Bool *’ but argument is of type ‘_Bool’

a bool pointer argument cannot take true or false but either &boolval
or NULL
Copy link
Member

@devnexen devnexen left a comment

Choose a reason for hiding this comment

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

LGTM

@devnexen devnexen closed this in ab3f871 Feb 13, 2023
@devnexen
Copy link
Member

Thank you !

@crrodriguez crrodriguez deleted the invalid_c23 branch February 13, 2023 20:12
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.

2 participants