Changing the ASSERT, so that it doesn't spit out an "unused variable" warning on Release builds doesn't work, because then it expects this variable to exist. (which is not the case for some struct elements passed to ASSERT in some other parts of the kernel)
svn path=/trunk/; revision=33486
extern PPHYSICAL_PAGE MmPageArray;
extern ULONG MmPageArraySize;
extern PPHYSICAL_PAGE MmPageArray;
extern ULONG MmPageArraySize;
+ /* Mark MmPageArraySize as unreferenced, otherwise it will appear as an unused variable on a Release build */
+ UNREFERENCED_PARAMETER(MmPageArraySize);
+
/* Make sure the PFN number is valid */
ASSERT(Pfn <= MmPageArraySize);
/* Make sure the PFN number is valid */
ASSERT(Pfn <= MmPageArraySize);