-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
I got a pair of related errors while trying to compile onto the Raspberry Pi:
/home/rmccourt/LL-DLEP/DestAdvert.cpp:378:27: error: comparison of integer expressions of different signedness: ‘time_t’ {aka ‘long int’} and ‘unsigned int’ [-Werror=sign-compare]
if (entry_age >= hold_interval)
~~~~~~~~~~^~~~~~~~~~~~~~~~
/home/rmccourt/LL-DLEP/DestAdvert.cpp:390:27: error: comparison of integer expressions of different signedness: ‘time_t’ {aka ‘long int’} and ‘unsigned int’ [-Werror=sign-compare]
if (entry_age >= expire_count * entry.info.reportInterval)
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I got it to compile by casting the results to time_t:
if (entry_age >= (time_t) hold_interval)
and
if (entry_age >= (time_t) (expire_count * entry.info.reportInterval))
Not positive that it's the perfect fix, but figured I'd flag it for someone who's more familiar with the code to look at. Not really sure if/how to submit this as a change for review.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels