Skip to content

Fix always-true comparison warning in pio_insn #2608

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

earlephilhower
Copy link
Contributor

The sideset_bit_count in pio_encode_sideset_opt is unsigned, so "sideset_bit_count >= 0" will always be true. GCC with pedantic warnings will complain when this happens.

Remove the unneeded >=0 portion of the parameter validity check.

Fixes #2607

The sideset_bit_count in pio_encode_sideset_opt is unsigned, so any comparison
"sideset_bit_count >= 0" will always be true.  GCC with pedantic warnings
will complain when this happens.

Remove the unneeded >=0 portion of the parameter validity check.

Fixes raspberrypi#2607
@kilograham kilograham added this to the 2.2.1 milestone Aug 13, 2025
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