Skip to content

Commit

Permalink
uHAL : Remove clang (v4.0.1) compilation warnings; refs #65
Browse files Browse the repository at this point in the history
  • Loading branch information
tswilliams committed Oct 21, 2017
1 parent 81a6cc6 commit 5154e07
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion uhal/tests/src/common/test_check_permissions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ BOOST_FIXTURE_TEST_CASE(check_permissions, TestFixture)
BOOST_AUTO_TEST_SUITE_END()

} // end ns tests
} // end ns uhal
} // end ns uhal
4 changes: 2 additions & 2 deletions uhal/tests/src/common/test_dummy_masking.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void write_read_masked ( const std::string& connection, const std::string& id )
ConnectionManager manager ( connection );
HwInterface hw=manager.getDevice ( id );
uint32_t x = static_cast<uint32_t> ( rand() );
hw.getNode ( "REG_LOWER_MASK" ).write ( x && 0xFFFF );
hw.getNode ( "REG_LOWER_MASK" ).write ( x & 0xFFFF );
hw.getNode ( "REG_UPPER_MASK" ).write ( x >> 16 );
CACTUS_TEST_THROW ( hw.getNode ( "REG_LOWER_MASK" ).write ( 0x1FFFF ),uhal::exception::exception );
CACTUS_TEST_THROW ( hw.getNode ( "REG_UPPER_MASK" ).write ( 0x1FFFF ),uhal::exception::exception );
Expand All @@ -60,7 +60,7 @@ void write_read_masked ( const std::string& connection, const std::string& id )
CACTUS_CHECK ( reg_l.value() <= 0xFFFF );
CACTUS_CHECK ( reg_u.value() <= 0xFFFF );
CACTUS_CHECK ( reg_l.valid() && reg_u.valid() );
CACTUS_CHECK ( reg_l.value() == ( x && 0xFFFF ) );
CACTUS_CHECK ( reg_l.value() == ( x & 0xFFFF ) );
CACTUS_CHECK ( reg_u.value() == ( x >> 16 ) );
}

Expand Down
4 changes: 2 additions & 2 deletions uhal/tests/src/common/test_masking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ BOOST_FIXTURE_TEST_CASE(write_read_masked, TestFixture)
ConnectionManager manager ( sConnectionFile );
HwInterface hw=manager.getDevice ( sDeviceId );
uint32_t x = static_cast<uint32_t> ( rand() );
hw.getNode ( "REG_LOWER_MASK" ).write ( x && 0xFFFF );
hw.getNode ( "REG_LOWER_MASK" ).write ( x & 0xFFFF );
hw.getNode ( "REG_UPPER_MASK" ).write ( x >> 16 );
BOOST_CHECK_THROW ( hw.getNode ( "REG_LOWER_MASK" ).write ( 0x1FFFF ),uhal::exception::exception );
BOOST_CHECK_THROW ( hw.getNode ( "REG_UPPER_MASK" ).write ( 0x1FFFF ),uhal::exception::exception );
Expand All @@ -70,7 +70,7 @@ BOOST_FIXTURE_TEST_CASE(write_read_masked, TestFixture)
BOOST_CHECK ( reg_l.value() <= 0xFFFF );
BOOST_CHECK ( reg_u.value() <= 0xFFFF );
BOOST_CHECK ( reg_l.valid() && reg_u.valid() );
BOOST_CHECK_EQUAL ( reg_l.value(), ( x && 0xFFFF ) );
BOOST_CHECK_EQUAL ( reg_l.value(), ( x & 0xFFFF ) );
BOOST_CHECK_EQUAL ( reg_u.value(), ( x >> 16 ) );
}

Expand Down

0 comments on commit 5154e07

Please sign in to comment.