Fix sign compare compiler error

sba_tests
Ryan Macdonald 2018-04-09 11:55:46 -07:00
parent c2c52c89b1
commit 836bd7cb69
1 changed files with 2 additions and 2 deletions

View File

@ -2908,7 +2908,7 @@ static int riscv013_test_sba_config_reg(struct target *target,
prev_addr = curr_addr;
read_sbcs_nonbusy(target, &sbcs);
dmi_read(target, &curr_addr, DMI_SBADDRESS0);
if ((curr_addr - prev_addr != (1 << (uint32_t)sbaccess)) && i != 0) {
if ((curr_addr - prev_addr != (uint32_t)(1 << sbaccess)) && i != 0) {
LOG_ERROR("System Bus Access Test 2: Error with address autoincrement, sbaccess = %x", sbaccess);
test_passed = false;
}
@ -2928,7 +2928,7 @@ static int riscv013_test_sba_config_reg(struct target *target,
prev_addr = curr_addr;
read_sbcs_nonbusy(target, &sbcs);
dmi_read(target, &curr_addr, DMI_SBADDRESS0);
if ((curr_addr - prev_addr != (1 << (uint32_t)sbaccess)) && i != 0) {
if ((curr_addr - prev_addr != (uint32_t)(1 << sbaccess)) && i != 0) {
LOG_ERROR("System Bus Access Test 2: Error with address autoincrement, sbaccess = %x", sbaccess);
test_passed = false;
}