[ISAPNP] Fix some warnings

This commit is contained in:
Hervé Poussineau 2020-03-21 08:29:15 +01:00
parent b915dce420
commit 7b1e28e724
2 changed files with 4 additions and 4 deletions

View file

@ -84,7 +84,7 @@ IsaFdoCreateDeviceIDs(
LogDev->ProdId);
if (!NT_SUCCESS(Status))
return Status;
TempString.Length = (End - TempString.Buffer) * sizeof(WCHAR);
TempString.Length = (USHORT)((End - TempString.Buffer) * sizeof(WCHAR));
Status = IsaPnpDuplicateUnicodeString(
RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE,
&TempString,
@ -105,7 +105,7 @@ IsaFdoCreateDeviceIDs(
LogDev->ProdId);
if (!NT_SUCCESS(Status))
return Status;
TempString.Length = (End - TempString.Buffer) * sizeof(WCHAR);
TempString.Length = (USHORT)((End - TempString.Buffer) * sizeof(WCHAR));
Status = IsaPnpDuplicateUnicodeString(
RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE,
&TempString,
@ -125,7 +125,7 @@ IsaFdoCreateDeviceIDs(
LogDev->SerialNumber);
if (!NT_SUCCESS(Status))
return Status;
TempString.Length = (End - TempString.Buffer) * sizeof(WCHAR);
TempString.Length = (USHORT)((End - TempString.Buffer) * sizeof(WCHAR));
Status = IsaPnpDuplicateUnicodeString(
RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE,
&TempString,

View file

@ -252,7 +252,7 @@ IsaPdoStartReadPort(
PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor = &ResourceList->List[0].PartialResourceList.PartialDescriptors[i];
if (PartialDescriptor->Type == CmResourceTypePort)
{
PUCHAR ReadDataPort = (PUCHAR)PartialDescriptor->u.Port.Start.u.LowPart + 3;
PUCHAR ReadDataPort = ULongToPtr(PartialDescriptor->u.Port.Start.u.LowPart + 3);
if (PartialDescriptor->u.Port.Length > 1 && !FdoExt->ReadDataPort && NT_SUCCESS(IsaHwTryReadDataPort(ReadDataPort)))
{
FdoExt->ReadDataPort = ReadDataPort;