[NTOSKRNL]

- Fix some MSVC warnings
- Fix typo in IoReleaseRemoveLockEx

svn path=/trunk/; revision=52450
This commit is contained in:
Rafal Harabien 2011-06-25 10:26:59 +00:00
parent 5dd7ba690b
commit a40188b18a
6 changed files with 10 additions and 10 deletions

View file

@ -255,7 +255,7 @@ WriteCacheSegment(PCACHE_SEGMENT CacheSeg)
// MmGlobalPageDirectory and the real system PDE directory. What a mess...
//
{
int i = 0;
ULONG i = 0;
do
{
MmGetPfnForProcess(NULL, (PVOID)((ULONG_PTR)CacheSeg->BaseAddress + (i << PAGE_SHIFT)));

View file

@ -13,8 +13,8 @@
#include <debug.h>
/* Macros for reading resource flags */
#define IsExclusiveWaiting(r) (r->NumberOfExclusiveWaiters)
#define IsSharedWaiting(r) (r->NumberOfSharedWaiters)
#define IsExclusiveWaiting(r) (r->NumberOfExclusiveWaiters > 0)
#define IsSharedWaiting(r) (r->NumberOfSharedWaiters > 0)
#define IsOwnedExclusive(r) (r->Flag & ResourceOwnedExclusive)
#define IsBoostAllowed(r) (!(r->Flag & ResourceHasDisabledPriorityBoost))

View file

@ -1465,8 +1465,9 @@ QSI_DEF(SystemExceptionInformation)
PSYSTEM_EXCEPTION_INFORMATION ExceptionInformation =
(PSYSTEM_EXCEPTION_INFORMATION)Buffer;
PKPRCB Prcb;
ULONG i, AlignmentFixupCount = 0, ExceptionDispatchCount = 0;
ULONG AlignmentFixupCount = 0, ExceptionDispatchCount = 0;
ULONG FloatingEmulationCount = 0, ByteWordEmulationCount = 0;
CHAR i;
/* Check size of a buffer, it must match our expectations */
if (sizeof(SYSTEM_EXCEPTION_INFORMATION) != Size)
@ -1523,8 +1524,9 @@ QSI_DEF(SystemContextSwitchInformation)
{
PSYSTEM_CONTEXT_SWITCH_INFORMATION ContextSwitchInformation =
(PSYSTEM_CONTEXT_SWITCH_INFORMATION)Buffer;
ULONG ContextSwitches, i;
ULONG ContextSwitches;
PKPRCB Prcb;
CHAR i;
/* Check size of a buffer, it must match our expectations */
if (sizeof(SYSTEM_CONTEXT_SWITCH_INFORMATION) != Size)

View file

@ -40,10 +40,9 @@ FstubTranslateResource(IN OUT PVOID Context OPTIONAL,
IN PDEVICE_OBJECT PhysicalDeviceObject,
OUT PCM_PARTIAL_RESOURCE_DESCRIPTOR Target)
{
INT k;
KIRQL Irql;
KAFFINITY Affinity;
ULONG MinimumVector, Vector;
ULONG MinimumVector, Vector, k;
PIO_RESOURCE_DESCRIPTOR Alternative;
NTSTATUS Status = STATUS_UNSUCCESSFUL;
PAGED_CODE();

View file

@ -205,7 +205,7 @@ IoReleaseRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock,
/* Check if it was because we were low in memory
* If yes, then ignore, that's normal
*/
if (InterlockedDecrement(&(Lock->Dbg.LowMemoryCount) < 0))
if (InterlockedDecrement(&(Lock->Dbg.LowMemoryCount)) < 0)
{
/* Otherwise signal the issue, it shouldn't happen */
InterlockedIncrement(&(Lock->Dbg.LowMemoryCount));

View file

@ -166,8 +166,7 @@ IoCheckEaBufferValidity(IN PFILE_FULL_EA_INFORMATION EaBuffer,
OUT PULONG ErrorOffset)
{
PFILE_FULL_EA_INFORMATION EaBufferEnd;
ULONG NextEaBufferOffset;
LONG IntEaLength;
ULONG NextEaBufferOffset, IntEaLength;
PAGED_CODE();