fix address-of-packed-member warning of usb_handle
This commit is contained in:
parent
24b5f60b34
commit
5dd9b9dad8
|
@ -174,8 +174,8 @@ void handleUSBControlRequest(usbip_stage2_header *header)
|
|||
break;
|
||||
case 0xC0: // Microsoft OS 2.0 vendor-specific descriptor
|
||||
{
|
||||
uint16_t *wIndex = (uint16_t *)(&(header->u.cmd_submit.request.wIndex));
|
||||
switch (*wIndex)
|
||||
uint16_t wIndex = header->u.cmd_submit.request.wIndex.u16;
|
||||
switch (wIndex)
|
||||
{
|
||||
case MS_OS_20_DESCRIPTOR_INDEX:
|
||||
os_printf("* GET MSOS 2.0 vendor-specific descriptor\r\n");
|
||||
|
@ -189,7 +189,7 @@ void handleUSBControlRequest(usbip_stage2_header *header)
|
|||
|
||||
default:
|
||||
os_printf("USB unknown request, bmRequestType:%d,bRequest:%d,wIndex:%d\r\n",
|
||||
header->u.cmd_submit.request.bmRequestType, header->u.cmd_submit.request.bRequest, *wIndex);
|
||||
header->u.cmd_submit.request.bmRequestType, header->u.cmd_submit.request.bRequest, wIndex);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue