From 31c18116de2105deed8aa8dab84bf08a930f2112 Mon Sep 17 00:00:00 2001 From: Tomer Shalev Date: Tue, 13 Oct 2009 19:50:23 +0000 Subject: USB: Use explicit casting when setting wTotalLength field in descriptor git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23157 a1c6a512-1295-4272-9138-f99709370657 --- firmware/usbstack/usb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/usbstack/usb_core.c b/firmware/usbstack/usb_core.c index 7321d3e565..5093b93301 100644 --- a/firmware/usbstack/usb_core.c +++ b/firmware/usbstack/usb_core.c @@ -567,7 +567,7 @@ static void request_handler_device_get_descriptor(struct usb_ctrlrequest* req) } } config_descriptor.bNumInterfaces = usb_core_num_interfaces; - config_descriptor.wTotalLength = size; + config_descriptor.wTotalLength = (uint16_t)size; memcpy(&response_data[0],&config_descriptor, sizeof(struct usb_config_descriptor)); -- cgit v1.2.3