summaryrefslogtreecommitdiff
path: root/libusb
diff options
context:
space:
mode:
authorPete Batard <pbatard@gmail.com>2010-02-01 19:26:13 +0000
committerPete Batard <pbatard@gmail.com>2010-02-01 19:26:13 +0000
commitc8b4ec4c6ddd78d1c56874dfaae8e53d3e728321 (patch)
tree475b9907e44db74fab8e8d7b0d26fc17a7dcc4f3 /libusb
parent8a35c05b5a7666248acf21d79318bd151a3831d5 (diff)
downloadlibusb-c8b4ec4c6ddd78d1c56874dfaae8e53d3e728321.tar.gz
r131: fixed various /W4 warnings for MSVC (core files)r131
Diffstat (limited to 'libusb')
-rw-r--r--libusb/descriptor.c2
-rw-r--r--libusb/libusbi.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/libusb/descriptor.c b/libusb/descriptor.c
index 6cbe23c..da4dbbe 100644
--- a/libusb/descriptor.c
+++ b/libusb/descriptor.c
@@ -51,7 +51,7 @@ int usbi_parse_descriptor(unsigned char *source, char *descriptor, void *dest,
*dp++ = *sp++;
break;
case 'w': /* 16-bit word, convert from little endian to CPU */
- dp += ((unsigned long)dp & 1); /* Align to word boundary */
+ dp += ((uintptr_t)dp & 1); /* Align to word boundary */
if (host_endian) {
memcpy(dp, sp, 2);
diff --git a/libusb/libusbi.h b/libusb/libusbi.h
index 6d2e661..2355535 100644
--- a/libusb/libusbi.h
+++ b/libusb/libusbi.h
@@ -54,7 +54,7 @@ struct list_head {
* member - the list_head element in "type"
*/
#define list_entry(ptr, type, member) \
- ((type *)((char *)(ptr) - (unsigned long)(&((type *)0L)->member)))
+ ((type *)((uintptr_t)(ptr) - (uintptr_t)(&((type *)0L)->member)))
/* Get each entry from a list
* pos - A structure pointer has a "member" element