Commit Graph

2 Commits (19d131973c50213daf355148c27dc8c265d0ae84)

Author SHA1 Message Date
Adam Green c0d7c3fb39 USBHost: Silence narrowing warning in USBHostMSD::inquiry
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.
2013-08-29 21:16:45 -07:00
unknown 1c981f929a add USBHost library 2013-03-14 16:36:35 +00:00