Commit 056bf04c authored by Vitaly Lipatov's avatar Vitaly Lipatov

fix strange warning about overflow PassiveTimer constructor

../extensions/SharedMemory/SharedMemory.h: In constructor ‘SharedMemory::HeartBeatInfo::HeartBeatInfo()’: ../extensions/SharedMemory/SharedMemory.h:422:37: error: overflow in implicit constant conversion [-Werror=overflow] ptReboot(UniSetTimer::WaitUpTime)
parent 99de8ccd
......@@ -412,8 +412,9 @@ class SharedMemory:
UniSetTypes::uniset_rwmutex mutex_start;
struct HeartBeatInfo
class HeartBeatInfo
{
public:
HeartBeatInfo():
a_sid(UniSetTypes::DefaultObjectId),
d_sid(UniSetTypes::DefaultObjectId),
......
......@@ -33,6 +33,13 @@ TEST_CASE("PassiveTimer", "[PassiveTimer]" )
REQUIRE( pt.getLeft(100) == 100 );
}
SECTION( "Init WaitUpTime" )
{
PassiveTimer pt(UniSetTimer::WaitUpTime);
REQUIRE( pt.getInterval() == 0 ); // TIMEOUT_INF );
REQUIRE( pt.getLeft(100) == 100 );
}
SECTION( "Init < 0 " )
{
PassiveTimer pt(-10);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment