Fixed compiler warnings for usb channel
This commit is contained in:
parent
7b0836a74f
commit
9d014fe1ea
@ -265,7 +265,8 @@ static UINT urdbrc_send_usb_device_add(URBDRC_CHANNEL_CALLBACK* callback, IUDEVI
|
||||
const UINT16 bcdDevice = (UINT16)pdev->query_device_descriptor(pdev, BCD_DEVICE);
|
||||
sprintf_s(HardwareIds[1], DEVICE_HARDWARE_ID_SIZE,
|
||||
"USB\\VID_%04" PRIX16 "&PID_%04" PRIX16 "", idVendor, idProduct);
|
||||
sprintf_s(HardwareIds[0], DEVICE_HARDWARE_ID_SIZE, "%s&REV_%04" PRIX16 "", HardwareIds[1],
|
||||
sprintf_s(HardwareIds[0], DEVICE_HARDWARE_ID_SIZE,
|
||||
"USB\\VID_%04" PRIX16 "&PID_%04" PRIX16 "&REV_%04" PRIX16 "", idVendor, idProduct,
|
||||
bcdDevice);
|
||||
}
|
||||
{
|
||||
@ -277,18 +278,20 @@ static UINT urdbrc_send_usb_device_add(URBDRC_CHANNEL_CALLBACK* callback, IUDEVI
|
||||
{
|
||||
sprintf_s(CompatibilityIds[2], DEVICE_COMPATIBILITY_ID_SIZE, "USB\\Class_%02" PRIX8 "",
|
||||
bDeviceClass);
|
||||
sprintf_s(CompatibilityIds[1], DEVICE_COMPATIBILITY_ID_SIZE, "%s&SubClass_%02" PRIX8 "",
|
||||
CompatibilityIds[2], bDeviceSubClass);
|
||||
sprintf_s(CompatibilityIds[0], DEVICE_COMPATIBILITY_ID_SIZE, "%s&Prot_%02" PRIX8 "",
|
||||
CompatibilityIds[1], bDeviceProtocol);
|
||||
sprintf_s(CompatibilityIds[1], DEVICE_COMPATIBILITY_ID_SIZE,
|
||||
"USB\\Class_%02" PRIX8 "&SubClass_%02" PRIX8 "", bDeviceClass,
|
||||
bDeviceSubClass);
|
||||
sprintf_s(CompatibilityIds[0], DEVICE_COMPATIBILITY_ID_SIZE,
|
||||
"USB\\Class_%02" PRIX8 "&SubClass_%02" PRIX8 "&Prot_%02" PRIX8 "",
|
||||
bDeviceClass, bDeviceSubClass, bDeviceProtocol);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf_s(CompatibilityIds[2], DEVICE_COMPATIBILITY_ID_SIZE, "USB\\DevClass_00");
|
||||
sprintf_s(CompatibilityIds[1], DEVICE_COMPATIBILITY_ID_SIZE, "%s&SubClass_00",
|
||||
CompatibilityIds[2]);
|
||||
sprintf_s(CompatibilityIds[0], DEVICE_COMPATIBILITY_ID_SIZE, "%s&Prot_00",
|
||||
CompatibilityIds[1]);
|
||||
sprintf_s(CompatibilityIds[1], DEVICE_COMPATIBILITY_ID_SIZE,
|
||||
"USB\\DevClass_00&SubClass_00");
|
||||
sprintf_s(CompatibilityIds[0], DEVICE_COMPATIBILITY_ID_SIZE,
|
||||
"USB\\DevClass_00&SubClass_00&Prot_00");
|
||||
}
|
||||
}
|
||||
func_instance_id_generate(pdev, strInstanceId, DEVICE_INSTANCE_STR_SIZE);
|
||||
|
Loading…
Reference in New Issue
Block a user