From 645b22988a56def888f6cb45d30c2547b1e8cec6 Mon Sep 17 00:00:00 2001 From: Dmitry Gorbachev Date: Wed, 1 Jul 2009 09:59:47 +0000 Subject: [PATCH] Fix some warnings / bugs. svn path=/trunk/; revision=41724 --- reactos/ntoskrnl/include/internal/mm.h | 2 +- reactos/ntoskrnl/ke/freeldr.c | 2 +- reactos/ntoskrnl/mm/ARM3/mdlsup.c | 2 +- reactos/ntoskrnl/mm/freelist.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/reactos/ntoskrnl/include/internal/mm.h b/reactos/ntoskrnl/include/internal/mm.h index ada4602f478..6981d4f5840 100644 --- a/reactos/ntoskrnl/include/internal/mm.h +++ b/reactos/ntoskrnl/include/internal/mm.h @@ -1186,8 +1186,8 @@ MmCreateHyperspaceMapping(IN PFN_NUMBER Page) return MiMapPageInHyperSpace(HyperProcess, Page, &HyperIrql); } -PVOID FORCEINLINE +PVOID MiMapPageToZeroInHyperSpace(IN PFN_NUMBER Page) { PMMPFN Pfn1 = MiGetPfnEntry(Page); diff --git a/reactos/ntoskrnl/ke/freeldr.c b/reactos/ntoskrnl/ke/freeldr.c index cf706921d41..1c71e791046 100644 --- a/reactos/ntoskrnl/ke/freeldr.c +++ b/reactos/ntoskrnl/ke/freeldr.c @@ -309,7 +309,7 @@ KiRosConfigureArcDescriptor(IN ULONG PageBegin, } /* Check if the block matches us, and we haven't tried combining yet */ - if ((BlockType == MemoryType) && !(Combined)) + if (((TYPE_OF_MEMORY)BlockType == MemoryType) && !(Combined)) { /* Check if it starts where we end */ if (BlockBegin == PageEnd) diff --git a/reactos/ntoskrnl/mm/ARM3/mdlsup.c b/reactos/ntoskrnl/mm/ARM3/mdlsup.c index 6df5c1aa459..3bc121cd77b 100644 --- a/reactos/ntoskrnl/mm/ARM3/mdlsup.c +++ b/reactos/ntoskrnl/mm/ARM3/mdlsup.c @@ -328,7 +328,7 @@ MmMapLockedPagesSpecifyCache(IN PMDL Mdl, // // Get the correct cache type // - IsIoMapping = Mdl->MdlFlags & MDL_IO_SPACE; + IsIoMapping = (Mdl->MdlFlags & MDL_IO_SPACE) != 0; CacheAttribute = MiPlatformCacheAttributes[IsIoMapping][CacheType]; // diff --git a/reactos/ntoskrnl/mm/freelist.c b/reactos/ntoskrnl/mm/freelist.c index 4f02e377ef6..353c3f7362e 100644 --- a/reactos/ntoskrnl/mm/freelist.c +++ b/reactos/ntoskrnl/mm/freelist.c @@ -453,7 +453,7 @@ MiAllocatePagesForMdl(IN PHYSICAL_ADDRESS LowAddress, KIRQL OldIrql; PLIST_ENTRY ListEntry; PPHYSICAL_PAGE Pfn1; - ULONG LookForZeroedPages; + INT LookForZeroedPages; ASSERT (KeGetCurrentIrql() <= APC_LEVEL); // @@ -689,7 +689,7 @@ MiAllocatePagesForMdl(IN PHYSICAL_ADDRESS LowAddress, // Check if we've reached the end // Page = *MdlPage; - if (Page == -1) break; + if (Page == (PFN_NUMBER)-1) break; // // Get the PFN entry for the page and check if we should zero it out