MFp4 //depot/projects/usb@159925

Cast variables properly for non-32-bit platforms.

Submitted by:	Hans Petter Selasky
This commit is contained in:
Andrew Thompson 2009-04-05 18:20:58 +00:00
parent 3930731567
commit c48fb077ea

View File

@ -48,19 +48,19 @@ typedef uint8_t uQWord[8];
#define UGETW(w) \
((w)[0] | \
((w)[1] << 8))
(((uint16_t)((w)[1])) << 8))
#define UGETDW(w) \
((w)[0] | \
((w)[1] << 8) | \
((w)[2] << 16) | \
((w)[3] << 24))
(((uint16_t)((w)[1])) << 8) | \
(((uint32_t)((w)[2])) << 16) | \
(((uint32_t)((w)[3])) << 24))
#define UGETQW(w) \
((w)[0] | \
((w)[1] << 8) | \
((w)[2] << 16) | \
((w)[3] << 24) | \
(((uint16_t)((w)[1])) << 8) | \
(((uint32_t)((w)[2])) << 16) | \
(((uint32_t)((w)[3])) << 24) | \
(((uint64_t)((w)[4])) << 32) | \
(((uint64_t)((w)[5])) << 40) | \
(((uint64_t)((w)[6])) << 48) | \