Skip to content
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

Fix warning about comparison of integer expressions of different signedness #53658

Merged
merged 2 commits into from
Mar 11, 2024

Conversation

giordano
Copy link
Contributor

@giordano giordano commented Mar 8, 2024

This was done in #50172 only for x86 and the fallback platform:

if (match.best_idx == (uint32_t)-1)

if (match_idx == (uint32_t)-1)

but based on the warning

    CC src/processor.o
In file included from /home/mose/repo/julia/src/processor.cpp:1009:
/home/mose/repo/julia/src/processor_arm.cpp: In function 'uint32_t ARM::sysimg_init_cb(const void*, jl_value_t**)':
/home/mose/repo/julia/src/processor_arm.cpp:1606:24: warning: comparison of integer expressions of different signedness: 'uint32_t' {aka 'unsigned int'} and 'int' [-Wsign-compare]
 1606 |     if (match.best_idx == -1)
      |         ~~~~~~~~~~~~~~~^~~~~

I guess we should do the same also for this architecture.

@giordano giordano requested a review from vchuravy March 8, 2024 17:58
@gbaraldi
Copy link
Member

gbaraldi commented Mar 8, 2024

Should we just use UINTMAX here?

@giordano giordano merged commit 5fc1662 into master Mar 11, 2024
7 checks passed
@giordano giordano deleted the mg/processor-arm branch March 11, 2024 20:54
giordano added a commit that referenced this pull request Nov 10, 2024
giordano added a commit that referenced this pull request Nov 10, 2024
N5N3 pushed a commit that referenced this pull request Nov 11, 2024
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