PERFORCE change 159380 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Wed Mar 18 07:05:07 PDT 2009
http://perforce.freebsd.org/chv.cgi?CH=159380
Change 159380 by hselasky at hselasky_laptop001 on 2009/03/18 14:04:59
USB CORE: Fixes for 8-bit and 16-bit compilation.
Affected files ...
.. //depot/projects/usb/src/sys/dev/usb/usb_endian.h#2 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/usb/usb_endian.h#2 (text+ko) ====
@@ -48,19 +48,19 @@
#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) | \
More information about the p4-projects
mailing list