Skip to content

Fix #382: [-Wsign-compare] #385

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

Merged
merged 1 commit into from
Nov 8, 2019
Merged

Fix #382: [-Wsign-compare] #385

merged 1 commit into from
Nov 8, 2019

Conversation

henrygab
Copy link
Collaborator

@henrygab henrygab commented Nov 8, 2019

Fix #382

Use uint32_t to store timestamp instead of int32_t.
Adjust comparison to use timestamp as a zero-basis.

comparison between signed and unsigned integer expressions

Use uint32_t to store timestamp instead of int32_t.
Adjust comparison to use timestamp as a zero-basis.

This also avoids a bugs where a record that is added just before millis() overflows would never be removed from the list.
Copy link
Member

@hathach hathach left a comment

Choose a reason for hiding this comment

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

Thank you !!

@hathach hathach merged commit 3606bbf into adafruit:master Nov 8, 2019
@henrygab henrygab deleted the patch-3 branch November 8, 2019 19:31
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.

[BUG] warnings building Bluefruit52Lib's rssi_proximity_central example
2 participants