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 out of range warning #2299

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

gullradriel
Copy link
Member

@gullradriel gullradriel commented Oct 14, 2024

This fix the following warnings:

portapack-mayhem/firmware/common/i2cdev_ppmod.cpp:72:66: warning: narrowing conversion of 'index' from 'uint32_t' to 'uint16_t'

portapack-mayhem/firmware/common/i2cdev_ppmod.cpp:72:80: warning: narrowing conversion of '(offset / ((unsigned int)i2cdev::transfer_block_size))' from 'size_t' to 'uint16_t'

I also added a placeholder and a TODO in case we want to manage errors when going over 16 bits range

Copy link
Member

@htotoo htotoo left a comment

Choose a reason for hiding this comment

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

Lgtm

@gullradriel gullradriel merged commit 26b830b into portapack-mayhem:next Oct 14, 2024
3 checks passed
@gullradriel gullradriel deleted the i2c-warning-fix branch October 14, 2024 16:26
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