Author: tkreuzer
Date: Mon Nov 15 23:43:28 2010
New Revision: 49604
URL:
http://svn.reactos.org/svn/reactos?rev=49604&view=rev
Log:
[NTOSKRNL]
Don't declare a variable in the moddle of a function, MSVC gets very angry about
that.
Modified:
branches/cmake-bringup/ntoskrnl/mm/ARM3/vadnode.c
branches/cmake-bringup/ntoskrnl/mm/marea.c
Modified: branches/cmake-bringup/ntoskrnl/mm/ARM3/vadnode.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/ntoskrnl/mm/ARM3/…
==============================================================================
--- branches/cmake-bringup/ntoskrnl/mm/ARM3/vadnode.c [iso-8859-1] (original)
+++ branches/cmake-bringup/ntoskrnl/mm/ARM3/vadnode.c [iso-8859-1] Mon Nov 15 23:43:28
2010
@@ -98,11 +98,13 @@
IN PMMADDRESS_NODE Parent,
IN TABLE_SEARCH_RESULT Result)
{
+ PMMVAD Vad;
+
/* Insert it into the tree */
RtlpInsertAvlTreeNode(Table, NewNode, Parent, Result);
/* Now insert an ARM3 MEMORY_AREA for this node, unless the insert was already from
the MEMORY_AREA code */
- PMMVAD Vad = (PMMVAD)NewNode;
+ Vad = (PMMVAD)NewNode;
if (Vad->u.VadFlags.Spare == 0)
{
NTSTATUS Status;
@@ -166,6 +168,8 @@
MiRemoveNode(IN PMMADDRESS_NODE Node,
IN PMM_AVL_TABLE Table)
{
+ PMMVAD Vad;
+
/* Call the AVL code */
RtlpDeleteAvlTreeNode(Table, Node);
@@ -181,7 +185,7 @@
}
/* Free the node from ReactOS view as well */
- PMMVAD Vad = (PMMVAD)Node;
+ Vad = (PMMVAD)Node;
if (Vad->u.VadFlags.Spare == 0)
{
PMEMORY_AREA MemoryArea;
Modified: branches/cmake-bringup/ntoskrnl/mm/marea.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/ntoskrnl/mm/marea…
==============================================================================
--- branches/cmake-bringup/ntoskrnl/mm/marea.c [iso-8859-1] (original)
+++ branches/cmake-bringup/ntoskrnl/mm/marea.c [iso-8859-1] Mon Nov 15 23:43:28 2010
@@ -374,8 +374,9 @@
/* Build a lame VAD if this is a user-space allocation */
if ((marea->EndingAddress < MmSystemRangeStart) && (marea->Type !=
MEMORY_AREA_OWNED_BY_ARM3))
{
+ PMMVAD Vad;
+
ASSERT(marea->Type == MEMORY_AREA_VIRTUAL_MEMORY || marea->Type ==
MEMORY_AREA_SECTION_VIEW);
- PMMVAD Vad;
Vad = ExAllocatePoolWithTag(NonPagedPool, sizeof(MMVAD), 'Fake');
ASSERT(Vad);
RtlZeroMemory(Vad, sizeof(MMVAD));