https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2dade10d543589e1f5f76…
commit 2dade10d543589e1f5f762bbc1695f2917341171
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Mon Jan 1 15:24:05 2018 +0100
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Sun Jan 14 13:54:14 2018 +0100
[NTOS] Fix 64 bit warnings
---
ntoskrnl/cache/section/swapout.c | 2 +-
ntoskrnl/ex/interlocked.c | 8 ++++----
ntoskrnl/fstub/translate.c | 2 +-
ntoskrnl/io/pnpmgr/pnpinit.c | 2 +-
ntoskrnl/mm/ARM3/contmem.c | 2 +-
ntoskrnl/mm/ARM3/mdlsup.c | 4 ++--
ntoskrnl/mm/ARM3/procsup.c | 6 +++---
ntoskrnl/mm/ARM3/section.c | 2 +-
ntoskrnl/mm/ARM3/vadnode.c | 8 ++++----
ntoskrnl/mm/ARM3/virtual.c | 2 +-
ntoskrnl/mm/marea.c | 2 ++
ntoskrnl/ob/oblife.c | 10 +++++-----
12 files changed, 26 insertions(+), 24 deletions(-)
diff --git a/ntoskrnl/cache/section/swapout.c b/ntoskrnl/cache/section/swapout.c
index 35805a1462..4c6f100f5d 100644
--- a/ntoskrnl/cache/section/swapout.c
+++ b/ntoskrnl/cache/section/swapout.c
@@ -254,7 +254,7 @@ MmFinalizeSectionPageOut(PMM_SECTION_SEGMENT Segment,
}
/* Note: Writing may evict the segment... Nothing is guaranteed from here down */
- MiSetPageEvent(Segment, FileOffset->LowPart);
+ MiSetPageEvent(Segment, (ULONG_PTR)FileOffset->QuadPart);
DPRINT("Status %x\n", Status);
return Status;
diff --git a/ntoskrnl/ex/interlocked.c b/ntoskrnl/ex/interlocked.c
index 80a123b7d6..17f20cbc07 100644
--- a/ntoskrnl/ex/interlocked.c
+++ b/ntoskrnl/ex/interlocked.c
@@ -184,8 +184,8 @@ ExInterlockedRemoveHeadList(
/* Remove the first entry from the list head */
ListEntry = RemoveHeadList(ListHead);
#if DBG
- ListEntry->Flink = (PLIST_ENTRY)0xBADDD0FF;
- ListEntry->Blink = (PLIST_ENTRY)0xBADDD0FF;
+ ListEntry->Flink = (PLIST_ENTRY)(ULONG_PTR)0xBADDD0FFBADDD0FFULL;
+ ListEntry->Blink = (PLIST_ENTRY)(ULONG_PTR)0xBADDD0FFBADDD0FFULL;
#endif
}
@@ -212,7 +212,7 @@ ExInterlockedPopEntryList(
ListEntry = PopEntryList(ListHead);
#if DBG
if (ListEntry)
- ListEntry->Next = (PSINGLE_LIST_ENTRY)0xBADDD0FF;
+ ListEntry->Next = (PSINGLE_LIST_ENTRY)(ULONG_PTR)0xBADDD0FFBADDD0FFULL;
#endif
/* Release the spinlock and restore interrupts */
@@ -418,7 +418,7 @@ ExfInterlockedPopEntryList(
ListEntry = PopEntryList(ListHead);
#if DBG
if (ListEntry)
- ListEntry->Next = (PSINGLE_LIST_ENTRY)0xBADDD0FF;
+ ListEntry->Next = (PSINGLE_LIST_ENTRY)(ULONG_PTR)0xBADDD0FFBADDD0FFULL;
#endif
/* Release the spinlock and restore interrupts */
diff --git a/ntoskrnl/fstub/translate.c b/ntoskrnl/fstub/translate.c
index 3fa15e0c09..fdb27be1bf 100644
--- a/ntoskrnl/fstub/translate.c
+++ b/ntoskrnl/fstub/translate.c
@@ -176,7 +176,7 @@ xHalGetInterruptTranslator(IN INTERFACE_TYPE ParentInterfaceType,
Translator->Size = sizeof(TRANSLATOR_INTERFACE);
Translator->Version = HAL_IRQ_TRANSLATOR_VERSION;
/* In case caller set interface to undefined, faulty it to ISA */
- Translator->Context = (PVOID)((BridgeInterfaceType == InterfaceTypeUndefined) ?
Isa : BridgeInterfaceType);
+ Translator->Context = UlongToPtr((BridgeInterfaceType == InterfaceTypeUndefined) ?
Isa : BridgeInterfaceType);
Translator->InterfaceReference = FstubTranslatorNull;
Translator->InterfaceDereference = FstubTranslatorNull;
Translator->TranslateResources = FstubTranslateResource;
diff --git a/ntoskrnl/io/pnpmgr/pnpinit.c b/ntoskrnl/io/pnpmgr/pnpinit.c
index 7153cd2d73..7545f84851 100644
--- a/ntoskrnl/io/pnpmgr/pnpinit.c
+++ b/ntoskrnl/io/pnpmgr/pnpinit.c
@@ -63,7 +63,7 @@ PiInitCacheGroupInformation(VOID)
/* Bogus data */
PiInitGroupOrderTableCount = 0;
- PiInitGroupOrderTable = (PVOID)0xBABEB00B;
+ PiInitGroupOrderTable = (PVOID)(ULONG_PTR)0xBABEB00BBABEB00BULL;
return STATUS_SUCCESS;
}
diff --git a/ntoskrnl/mm/ARM3/contmem.c b/ntoskrnl/mm/ARM3/contmem.c
index 6a7fe01cbd..506f988b81 100644
--- a/ntoskrnl/mm/ARM3/contmem.c
+++ b/ntoskrnl/mm/ARM3/contmem.c
@@ -146,7 +146,7 @@ MiFindContiguousPages(IN PFN_NUMBER LowestPfn,
Pfn1->u3.e1.EndOfAllocation = 0;
Pfn1->u3.e1.PrototypePte = 0;
Pfn1->u4.VerifierAllocation = 0;
- Pfn1->PteAddress = (PVOID)0xBAADF00D;
+ Pfn1->PteAddress =
(PVOID)(ULONG_PTR)0xBAADF00DBAADF00DULL;
//
// Check if this is the last PFN, otherwise go on
diff --git a/ntoskrnl/mm/ARM3/mdlsup.c b/ntoskrnl/mm/ARM3/mdlsup.c
index 7317a9a30f..4675fe2c58 100644
--- a/ntoskrnl/mm/ARM3/mdlsup.c
+++ b/ntoskrnl/mm/ARM3/mdlsup.c
@@ -1194,7 +1194,7 @@ MmProbeAndLockPages(IN PMDL Mdl,
Address = MiPteToAddress(PointerPte);
//HACK: Pass a placeholder TrapInformation so the fault handler knows
we're unlocked
- Status = MmAccessFault(FALSE, Address, KernelMode, (PVOID)0xBADBADA3);
+ Status = MmAccessFault(FALSE, Address, KernelMode,
(PVOID)(ULONG_PTR)0xBADBADA3BADBADA3ULL);
if (!NT_SUCCESS(Status))
{
//
@@ -1263,7 +1263,7 @@ MmProbeAndLockPages(IN PMDL Mdl,
//
//HACK: Pass a placeholder TrapInformation so the fault handler
knows we're unlocked
- Status = MmAccessFault(TRUE, Address, KernelMode,
(PVOID)0xBADBADA3);
+ Status = MmAccessFault(TRUE, Address, KernelMode,
(PVOID)(ULONG_PTR)0xBADBADA3BADBADA3ULL);
if (!NT_SUCCESS(Status))
{
//
diff --git a/ntoskrnl/mm/ARM3/procsup.c b/ntoskrnl/mm/ARM3/procsup.c
index 7522e35497..95e760a2ec 100644
--- a/ntoskrnl/mm/ARM3/procsup.c
+++ b/ntoskrnl/mm/ARM3/procsup.c
@@ -855,10 +855,10 @@ MiInitializeWorkingSetList(IN PEPROCESS CurrentProcess)
MmWorkingSetList->HashTable = NULL;
MmWorkingSetList->HashTableSize = 0;
MmWorkingSetList->NumberOfImageWaiters = 0;
- MmWorkingSetList->Wsle = (PVOID)0xDEADBABE;
+ MmWorkingSetList->Wsle = (PVOID)(ULONG_PTR)0xDEADBABEDEADBABEULL;
MmWorkingSetList->VadBitMapHint = 1;
- MmWorkingSetList->HashTableStart = (PVOID)0xBADAB00B;
- MmWorkingSetList->HighestPermittedHashAddress = (PVOID)0xCAFEBABE;
+ MmWorkingSetList->HashTableStart = (PVOID)(ULONG_PTR)0xBADAB00BBADAB00BULL;
+ MmWorkingSetList->HighestPermittedHashAddress =
(PVOID)(ULONG_PTR)0xCAFEBABECAFEBABEULL;
MmWorkingSetList->FirstFree = 1;
MmWorkingSetList->FirstDynamic = 2;
MmWorkingSetList->NextSlot = 3;
diff --git a/ntoskrnl/mm/ARM3/section.c b/ntoskrnl/mm/ARM3/section.c
index 6a2710e0be..689f6cd86f 100644
--- a/ntoskrnl/mm/ARM3/section.c
+++ b/ntoskrnl/mm/ARM3/section.c
@@ -1370,7 +1370,7 @@ MiMapViewOfDataSection(IN PCONTROL_AREA ControlArea,
}
RtlZeroMemory(Vad, sizeof(MMVAD_LONG));
- Vad->u4.Banked = (PVOID)0xDEADBABE;
+ Vad->u4.Banked = (PVOID)(ULONG_PTR)0xDEADBABEDEADBABEULL;
/* Write all the data required in the VAD for handling a fault */
Vad->ControlArea = ControlArea;
diff --git a/ntoskrnl/mm/ARM3/vadnode.c b/ntoskrnl/mm/ARM3/vadnode.c
index b20839ab62..5464e9f009 100644
--- a/ntoskrnl/mm/ARM3/vadnode.c
+++ b/ntoskrnl/mm/ARM3/vadnode.c
@@ -172,7 +172,7 @@ MiInsertNode(IN PMM_AVL_TABLE Table,
else
{
/* This is a section VAD. Store the MAREA here for now */
- ASSERT(Vad->u4.Banked == (PVOID)0xDEADBABE);
+ ASSERT(Vad->u4.Banked == (PVOID)(ULONG_PTR)0xDEADBABEDEADBABEULL);
Vad->u4.Banked = (PVOID)MemoryArea;
}
}
@@ -399,7 +399,7 @@ MiRemoveNode(IN PMMADDRESS_NODE Node,
if (MemoryArea)
{
/* Make sure we have not already freed it */
- ASSERT(MemoryArea != (PVOID)0xDEADBAB1);
+ ASSERT(MemoryArea != (PVOID)(ULONG_PTR)0xDEADBAB1DEADBAB1ULL);
/* Get the process */
Process = CONTAINING_RECORD(Table, EPROCESS, VadRoot);
@@ -415,12 +415,12 @@ MiRemoveNode(IN PMMADDRESS_NODE Node,
if (Vad->ControlArea == NULL)
{
/* Delete the pointer to it */
- Vad->FirstPrototypePte = (PVOID)0xDEADBAB1;
+ Vad->FirstPrototypePte = (PVOID)(ULONG_PTR)0xDEADBAB1DEADBAB1ULL;
}
else
{
/* Delete the pointer to it */
- Vad->u4.Banked = (PVOID)0xDEADBAB1;
+ Vad->u4.Banked = (PVOID)(ULONG_PTR)0xDEADBAB1DEADBAB1ULL;
}
}
}
diff --git a/ntoskrnl/mm/ARM3/virtual.c b/ntoskrnl/mm/ARM3/virtual.c
index fc4ea2e6d2..bbc773a919 100644
--- a/ntoskrnl/mm/ARM3/virtual.c
+++ b/ntoskrnl/mm/ARM3/virtual.c
@@ -3350,7 +3350,7 @@ MiLockVirtualMemory(
CurrentVa = MiPteToAddress(PointerPte);
//HACK: Pass a placeholder TrapInformation so the fault handler knows
we're unlocked
- TempStatus = MmAccessFault(TRUE, CurrentVa, KernelMode, (PVOID)0xBADBADA3);
+ TempStatus = MmAccessFault(TRUE, CurrentVa, KernelMode,
(PVOID)(ULONG_PTR)0xBADBADA3BADBADA3ULL);
if (!NT_SUCCESS(TempStatus))
{
// This should only happen, when remote backing storage is not
accessible
diff --git a/ntoskrnl/mm/marea.c b/ntoskrnl/mm/marea.c
index 1dc4d612d4..9cf006f804 100644
--- a/ntoskrnl/mm/marea.c
+++ b/ntoskrnl/mm/marea.c
@@ -570,8 +570,10 @@ NTSTATUS
NTAPI
MmDeleteProcessAddressSpace(PEPROCESS Process)
{
+#ifndef _M_AMD64
KIRQL OldIrql;
PVOID Address;
+#endif
DPRINT("MmDeleteProcessAddressSpace(Process %p (%s))\n", Process,
Process->ImageFileName);
diff --git a/ntoskrnl/ob/oblife.c b/ntoskrnl/ob/oblife.c
index d3c95996da..2bfc35a089 100644
--- a/ntoskrnl/ob/oblife.c
+++ b/ntoskrnl/ob/oblife.c
@@ -137,7 +137,7 @@ ObpDeallocateObject(IN PVOID Object)
}
/* Catch invalid access */
- Header->Type = (POBJECT_TYPE)0xBAADB0B0;
+ Header->Type = (POBJECT_TYPE)(ULONG_PTR)0xBAADB0B0BAADB0B0ULL;
/* Free the object using the same allocation tag */
ExFreePoolWithTag(HeaderLocation, ObjectType->Key);
@@ -1215,14 +1215,14 @@ ObCreateObjectType(IN PUNICODE_STRING TypeName,
else if ((TypeName->Length == 8) && !(wcscmp(TypeName->Buffer,
L"File")))
{
/* Wait on the File Object's event directly */
- LocalObjectType->DefaultObject = (PVOID)FIELD_OFFSET(FILE_OBJECT,
- Event);
+ LocalObjectType->DefaultObject = UlongToPtr(FIELD_OFFSET(FILE_OBJECT,
+ Event));
}
else if ((TypeName->Length == 24) && !(wcscmp(TypeName->Buffer,
L"WaitablePort")))
{
/* Wait on the LPC Port's object directly */
- LocalObjectType->DefaultObject = (PVOID)FIELD_OFFSET(LPCP_PORT_OBJECT,
- WaitEvent);
+ LocalObjectType->DefaultObject = UlongToPtr(FIELD_OFFSET(LPCP_PORT_OBJECT,
+ WaitEvent));
}
else
{