https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7b1e28e7243ab6f76f3c0…
commit 7b1e28e7243ab6f76f3c032a2b6a95f373b36348
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Sat Mar 21 08:29:15 2020 +0100
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Sat Mar 21 08:29:15 2020 +0100
[ISAPNP] Fix some warnings
---
drivers/bus/isapnp/isapnp.c | 6 +++---
drivers/bus/isapnp/pdo.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/bus/isapnp/isapnp.c b/drivers/bus/isapnp/isapnp.c
index 7f2731b7ce4..69fbcbb9f3a 100644
--- a/drivers/bus/isapnp/isapnp.c
+++ b/drivers/bus/isapnp/isapnp.c
@@ -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,
diff --git a/drivers/bus/isapnp/pdo.c b/drivers/bus/isapnp/pdo.c
index 82dc98cf1a9..917ab4d626d 100644
--- a/drivers/bus/isapnp/pdo.c
+++ b/drivers/bus/isapnp/pdo.c
@@ -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;