Add casting to align the types

This commit is contained in:
Serge Lamikhov-Center 2020-08-18 23:15:29 +03:00
parent 8e0b5754e4
commit cca512025b

View File

@ -667,20 +667,20 @@ BOOST_AUTO_TEST_CASE(rearrange_local_symbols)
auto bound = psymsec->get_info();
auto num = rsymbols.get_symbols_num();
BOOST_CHECK_LE(bound, num);
BOOST_CHECK_LE((Elf_Xword)bound, num);
// Check that all symbols are LOCAL until the bound value
for (auto i = 0; i < bound; i++)
for (Elf_Word i = 0; i < bound; i++)
{
rsymbols.get_symbol(i, name, value, size, bind, type, section_index, other);
BOOST_CHECK_EQUAL(bind, STB_LOCAL);
BOOST_CHECK_EQUAL(bind, (unsigned char)STB_LOCAL);
}
// Check that all symbols are not LOCAL after the bound value
for (auto i = bound; i < num; i++)
for (Elf_Word i = bound; i < num; i++)
{
rsymbols.get_symbol(i, name, value, size, bind, type, section_index, other);
BOOST_CHECK_NE(bind, STB_LOCAL);
BOOST_CHECK_NE(bind, (unsigned char)STB_LOCAL);
}
}