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
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.
The text was updated successfully, but these errors were encountered:
The default DLEP compiler flags enable all warnings (-Wall) and treat all warnings as compiler errors (-Werror). For the tested platforms in the README, DLEP will compile cleanly with these settings. I've tested on some other platforms and found that we will get some warnings, which will cause the compile to fail with these flags. Due to this, we added cmake flags that let you disable these features.
Last week, I finally got some time to fire up one of my RPis on the bench. I reproduced the failures. When we have time, we'll see if we can find the correct fix, but in the meantime, you can just compile without -Werror set. I verified a successful compile (passing the test suite) on Raspbian via this route.
There's info on this in the BUILD section of the README, but here's the option for quick reference: cmake -DWARNINGS_AS_ERRORS=OFF ..
I got a pair of related errors while trying to compile onto the Raspberry Pi:
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.
The text was updated successfully, but these errors were encountered: