https://git.reactos.org/?p=reactos.git;a=commitdiff;h=72c51aabbab450a123883…
commit 72c51aabbab450a123883433074e1810d6939dc8
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Fri Mar 13 20:45:06 2020 +0100
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Fri Mar 13 20:45:06 2020 +0100
[NTOS:IO][GDI32][CMD] Fix some under-sized variables. CORE-14922
Fixes x64 boot with RTC.
---
base/shell/cmd/cmd.c | 6 +++---
ntoskrnl/io/pnpmgr/pnpmgr.c | 2 +-
win32ss/gdi/gdi32/objects/dc.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/base/shell/cmd/cmd.c b/base/shell/cmd/cmd.c
index 2b63948d94e..b4658f9fc6c 100644
--- a/base/shell/cmd/cmd.c
+++ b/base/shell/cmd/cmd.c
@@ -147,7 +147,7 @@
typedef NTSTATUS (WINAPI *NtQueryInformationProcessProc)(HANDLE, PROCESSINFOCLASS,
PVOID, ULONG, PULONG);
-typedef NTSTATUS (WINAPI *NtReadVirtualMemoryProc)(HANDLE, PVOID, PVOID, ULONG, PULONG);
+typedef NTSTATUS (WINAPI *NtReadVirtualMemoryProc)(HANDLE, PVOID, PVOID, ULONG,
PSIZE_T);
BOOL bExit = FALSE; /* Indicates EXIT was typed */
BOOL bCanExit = TRUE; /* Indicates if this shell is exitable */
@@ -225,7 +225,7 @@ static BOOL IsConsoleProcess(HANDLE Process)
NTSTATUS Status;
PROCESS_BASIC_INFORMATION Info;
PEB ProcessPeb;
- ULONG BytesRead;
+ SIZE_T BytesRead;
if (NULL == NtQueryInformationProcessPtr || NULL == NtReadVirtualMemoryPtr)
{
@@ -245,7 +245,7 @@ static BOOL IsConsoleProcess(HANDLE Process)
sizeof(PEB), &BytesRead);
if (! NT_SUCCESS(Status) || sizeof(PEB) != BytesRead)
{
- WARN ("Couldn't read virt mem status %08x bytes read %lu\n",
Status, BytesRead);
+ WARN ("Couldn't read virt mem status %08x bytes read %Iu\n",
Status, BytesRead);
return TRUE;
}
diff --git a/ntoskrnl/io/pnpmgr/pnpmgr.c b/ntoskrnl/io/pnpmgr/pnpmgr.c
index 76d712298e1..476e8f78fef 100644
--- a/ntoskrnl/io/pnpmgr/pnpmgr.c
+++ b/ntoskrnl/io/pnpmgr/pnpmgr.c
@@ -4498,7 +4498,7 @@ IoInvalidateDeviceState(IN PDEVICE_OBJECT PhysicalDeviceObject)
{
PDEVICE_NODE DeviceNode = IopGetDeviceNode(PhysicalDeviceObject);
IO_STACK_LOCATION Stack;
- ULONG PnPFlags;
+ ULONG_PTR PnPFlags;
NTSTATUS Status;
IO_STATUS_BLOCK IoStatusBlock;
diff --git a/win32ss/gdi/gdi32/objects/dc.c b/win32ss/gdi/gdi32/objects/dc.c
index 716e42ee515..bde7f2377a4 100644
--- a/win32ss/gdi/gdi32/objects/dc.c
+++ b/win32ss/gdi/gdi32/objects/dc.c
@@ -15,7 +15,7 @@ IntCreateDICW(
UNICODE_STRING Device, Output;
HDC hdc = NULL;
BOOL Display = FALSE, Default = FALSE;
- ULONG UMdhpdev = 0;
+ HANDLE UMdhpdev = 0;
HANDLE hspool = NULL;
@@ -65,7 +65,7 @@ IntCreateDICW(
iType, // DCW 0 and ICW 1.
Display,
hspool,
- (PVOID) &UMdhpdev );
+ &UMdhpdev );
#if 0
// Handle something other than a normal dc object.
if (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)