From 5cd67c3c362fe87f8629678b291d38b9d556d2b7 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sun, 5 May 2013 12:18:49 +0000 Subject: [PATCH] [KMTESTS:MM] - Fix 64-bit warnings. Patch by Nikolay Borisov. ROSTESTS-112 #resolve svn path=/trunk/; revision=58940 --- rostests/kmtests/ntos_mm/ZwAllocateVirtualMemory.c | 4 ++-- rostests/kmtests/ntos_mm/ZwCreateSection.c | 2 +- rostests/kmtests/ntos_mm/ZwMapViewOfSection.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rostests/kmtests/ntos_mm/ZwAllocateVirtualMemory.c b/rostests/kmtests/ntos_mm/ZwAllocateVirtualMemory.c index 01ae694b7db..d551ee200ba 100644 --- a/rostests/kmtests/ntos_mm/ZwAllocateVirtualMemory.c +++ b/rostests/kmtests/ntos_mm/ZwAllocateVirtualMemory.c @@ -14,14 +14,14 @@ /* These are being used in ZwMapViewOfSection as well */ const char TestString[] = "TheLongBrownFoxJumpedTheWhiteRabbitTheLongBrownFoxJumpedTheWhiteRabbitTheLongBrownFoxJumpedTheWhiteRabbitTheLongBrownFoxJumpedTheWhiteRabbitTheLongBrownFoxJumpedTheWhiteRabbitTheLongBrownFoxJumpedThe"; -const SIZE_T TestStringSize = sizeof(TestString); +const ULONG TestStringSize = sizeof(TestString); VOID Test_ZwAllocateVirtualMemory(VOID); typedef struct _TEST_CONTEXT { HANDLE ProcessHandle; - ULONG RegionSize; + SIZE_T RegionSize; ULONG AllocationType; ULONG Protect; PVOID Bases[1024]; diff --git a/rostests/kmtests/ntos_mm/ZwCreateSection.c b/rostests/kmtests/ntos_mm/ZwCreateSection.c index 4dbc75e2586..54f2dc796b2 100644 --- a/rostests/kmtests/ntos_mm/ZwCreateSection.c +++ b/rostests/kmtests/ntos_mm/ZwCreateSection.c @@ -11,7 +11,7 @@ #define NO_HANDLE_CLOSE -998 #define _4mb 4194304 extern const char TestString[]; -extern const SIZE_T TestStringSize; +extern const ULONG TestStringSize; static UNICODE_STRING FileReadOnlyPath = RTL_CONSTANT_STRING(L"\\SystemRoot\\system32\\ntdll.dll"); static UNICODE_STRING WritableFilePath = RTL_CONSTANT_STRING(L"\\SystemRoot\\kmtest-MmSection.txt"); static UNICODE_STRING CalcImgPath = RTL_CONSTANT_STRING(L"\\SystemRoot\\system32\\calc.exe"); diff --git a/rostests/kmtests/ntos_mm/ZwMapViewOfSection.c b/rostests/kmtests/ntos_mm/ZwMapViewOfSection.c index 1350984a235..44f446f96ea 100644 --- a/rostests/kmtests/ntos_mm/ZwMapViewOfSection.c +++ b/rostests/kmtests/ntos_mm/ZwMapViewOfSection.c @@ -16,7 +16,7 @@ static UNICODE_STRING NtosImgPath = RTL_CONSTANT_STRING(L"\\SystemRoot\\system32 static UNICODE_STRING WritableFilePath = RTL_CONSTANT_STRING(L"\\SystemRoot\\kmtest-MmSection.txt"); static UNICODE_STRING SharedSectionName = RTL_CONSTANT_STRING(L"\\BaseNamedObjects\\kmtest-SharedSection"); extern const char TestString[]; -extern const SIZE_T TestStringSize; +extern const ULONG TestStringSize; static OBJECT_ATTRIBUTES NtdllObject; static OBJECT_ATTRIBUTES KmtestFileObject; static OBJECT_ATTRIBUTES NtoskrnlFileObject; @@ -266,7 +266,7 @@ AdvancedErrorChecks(HANDLE FileHandleReadOnly, HANDLE FileHandleWriteOnly) static SIZE_T -CompareFileContents(HANDLE FileHandle, SIZE_T BufferLength, PVOID Buffer) +CompareFileContents(HANDLE FileHandle, ULONG BufferLength, PVOID Buffer) { NTSTATUS Status; LARGE_INTEGER ByteOffset; -- 2.17.1