altera,libusb_ll,mcsParser: fix some compiler's warnings
This commit is contained in:
parent
803bdfecce
commit
21d4fccf28
|
|
@ -978,7 +978,7 @@ bool Altera::sectors_mask_start_end_addr(const Altera::max10_mem_t *mem,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* decrement eaddr until last bit == 1 found */
|
/* decrement eaddr until last bit == 1 found */
|
||||||
for (uint8_t i = 3; i >= 0; i--) {
|
for (int8_t i = 3; i >= 0; i--) {
|
||||||
if (update_sectors & (1 << i)) {
|
if (update_sectors & (1 << i)) {
|
||||||
end_bit = i + 1;
|
end_bit = i + 1;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ int libusb_ll::get_devices_list(const cable_t *cable)
|
||||||
bus_addr = cable->bus_addr;
|
bus_addr = cable->bus_addr;
|
||||||
device_addr = cable->device_addr;
|
device_addr = cable->device_addr;
|
||||||
vid_pid_filter = (vid != 0) && (pid != 0);
|
vid_pid_filter = (vid != 0) && (pid != 0);
|
||||||
bus_dev_filter = ~(bus_addr == 0 && device_addr == 0);
|
bus_dev_filter = !(bus_addr == 0 && device_addr == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ int McsParser::parse()
|
||||||
_base_addr = (loc_addr << 16);
|
_base_addr = (loc_addr << 16);
|
||||||
if (_base_addr * 8 > _bit_length)
|
if (_base_addr * 8 > _bit_length)
|
||||||
_bit_length = _base_addr * 8;
|
_bit_length = _base_addr * 8;
|
||||||
if (_bit_length > _bit_data.size() * 8)
|
if ((size_t)_bit_length > _bit_data.size() * 8)
|
||||||
_bit_data.resize(_bit_length / 8);
|
_bit_data.resize(_bit_length / 8);
|
||||||
sum += (loc_addr & 0xff) + ((loc_addr >> 8) & 0xff);
|
sum += (loc_addr & 0xff) + ((loc_addr >> 8) & 0xff);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue