[NTOS:MM] MiSetPagingOfDriver(): Add an explicit #if around unreachable code

This commit is contained in:
Serge Gautherie 2020-09-09 03:46:56 +02:00 committed by Jérôme Gardou
parent 869a914cfd
commit 710acab83d

View file

@ -2436,8 +2436,6 @@ MiSetSystemCodeProtection(
/* Flush it all */
KeFlushEntireTb(TRUE, TRUE);
return;
}
VOID
@ -2562,17 +2560,20 @@ NTAPI
MiSetPagingOfDriver(IN PMMPTE PointerPte,
IN PMMPTE LastPte)
{
#ifdef ENABLE_MISETPAGINGOFDRIVER
PVOID ImageBase;
PETHREAD CurrentThread = PsGetCurrentThread();
PFN_COUNT PageCount = 0;
PFN_NUMBER PageFrameIndex;
PMMPFN Pfn1;
#endif // ENABLE_MISETPAGINGOFDRIVER
PAGED_CODE();
#ifndef ENABLE_MISETPAGINGOFDRIVER
/* The page fault handler is broken and doesn't page back in! */
DPRINT1("WARNING: MiSetPagingOfDriver() called, but paging is broken! ignoring!\n");
return;
#else // ENABLE_MISETPAGINGOFDRIVER
/* Get the driver's base address */
ImageBase = MiPteToAddress(PointerPte);
ASSERT(MI_IS_SESSION_IMAGE_ADDRESS(ImageBase) == FALSE);
@ -2610,6 +2611,7 @@ MiSetPagingOfDriver(IN PMMPTE PointerPte,
/* Update counters */
InterlockedExchangeAdd((PLONG)&MmTotalSystemDriverPages, PageCount);
}
#endif // ENABLE_MISETPAGINGOFDRIVER
}
VOID