Skip to content

Fix -Wtype-limits warning by making the value signed #5299

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

Girgias
Copy link
Member

@Girgias Girgias commented Mar 25, 2020

From what I gathered the value received is a signed integer so I changed that instead of removing the if (idx >= 0) { condition which would be always true if idx is an unsigned integer.

@@ -774,7 +774,7 @@ static int find_call_num_args(zend_jit_trace_rec *p)
static int is_checked_guard(const zend_ssa *tssa, const zend_op **ssa_opcodes, uint32_t var, uint32_t phi_var)
{
if ((tssa->var_info[phi_var].type & MAY_BE_ANY) == MAY_BE_LONG) {
uint32_t idx = tssa->vars[var].definition;
int32_t idx = tssa->vars[var].definition;
Copy link
Member

Choose a reason for hiding this comment

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

Should be just int, as that's the type of definition.

@php-pulls php-pulls closed this in 3e6667d Mar 25, 2020
@Girgias Girgias deleted the fix-jit-Wtype-limits-warning branch March 25, 2020 23:08
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