You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Sample code currently emits warnings.
.../Bluefruit52Lib/examples/Projects/rssi_proximity/rssi_proximity_central/rssi_proximity_central.ino:
In function 'int invalidateRecords()':
.../Bluefruit52Lib/examples/Projects/rssi_proximity/rssi_proximity_central/rssi_proximity_central.ino:533:32:
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (records[i].timestamp <= millis() - TIMEOUT_MS)
Set up (please complete the following information)
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.
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.
Describe the bug
Sample code currently emits warnings.
Set up (please complete the following information)
To Reproduce
Steps to reproduce the behavior:
for the sample being fixed.
Expected behavior
Sample code should build without warnings.
The text was updated successfully, but these errors were encountered: