diff --git a/reactos/ntoskrnl/cc/copy.c b/reactos/ntoskrnl/cc/copy.c index 7e3d401d488..7162b6ab74e 100644 --- a/reactos/ntoskrnl/cc/copy.c +++ b/reactos/ntoskrnl/cc/copy.c @@ -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))); diff --git a/reactos/ntoskrnl/ex/resource.c b/reactos/ntoskrnl/ex/resource.c index 9d25086159b..cf179ffca0c 100644 --- a/reactos/ntoskrnl/ex/resource.c +++ b/reactos/ntoskrnl/ex/resource.c @@ -13,8 +13,8 @@ #include /* 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)) diff --git a/reactos/ntoskrnl/ex/sysinfo.c b/reactos/ntoskrnl/ex/sysinfo.c index 483c92057ea..ca006177891 100644 --- a/reactos/ntoskrnl/ex/sysinfo.c +++ b/reactos/ntoskrnl/ex/sysinfo.c @@ -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) diff --git a/reactos/ntoskrnl/fstub/translate.c b/reactos/ntoskrnl/fstub/translate.c index 839e6f01488..3fa15e0c091 100644 --- a/reactos/ntoskrnl/fstub/translate.c +++ b/reactos/ntoskrnl/fstub/translate.c @@ -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(); diff --git a/reactos/ntoskrnl/io/iomgr/remlock.c b/reactos/ntoskrnl/io/iomgr/remlock.c index 449fbc6c26b..0764861eba7 100644 --- a/reactos/ntoskrnl/io/iomgr/remlock.c +++ b/reactos/ntoskrnl/io/iomgr/remlock.c @@ -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)); diff --git a/reactos/ntoskrnl/io/iomgr/util.c b/reactos/ntoskrnl/io/iomgr/util.c index e2c0bcee0c1..c1164977a67 100644 --- a/reactos/ntoskrnl/io/iomgr/util.c +++ b/reactos/ntoskrnl/io/iomgr/util.c @@ -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();