mirror of https://github.com/ARMmbed/mbed-os.git
c0d7c3fb39
I changed the following initialization from: uint8_t cmd[6] = {0x12, (lun << 5) | evpd, page_code, 0, 36, 0}; to: uint8_t cmd[6] = {0x12, uint8_t((lun << 5) | evpd), page_code, 0, 36, 0}; This makes it clear to the compiler that we are Ok with the 32-bit integer result from the shift and logical OR operation (after integral promotions) being truncated down to a 8-bit unsigned value. This is safe as long as lun only has a value of 7 or lower. |
||
---|---|---|
.. | ||
USBHostMSD.cpp | ||
USBHostMSD.h |