mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 12:23:28 +00:00
patch from w3seek :Bug #: 1667 : NTOSKRNL: Fix GCC4 warning and return correct error code in NtSignalAndWaitForSingleObject
svn path=/trunk/; revision=23041
This commit is contained in:
@@ -261,7 +261,7 @@ KeUpdateRunTime(IN PKTRAP_FRAME TrapFrame,
|
||||
{
|
||||
/* Update user times */
|
||||
CurrentThread->UserTime++;
|
||||
InterlockedIncrement(&CurrentProcess->UserTime);
|
||||
InterlockedIncrement((PLONG)&CurrentProcess->UserTime);
|
||||
Prcb->UserTime++;
|
||||
}
|
||||
else
|
||||
@@ -276,7 +276,7 @@ KeUpdateRunTime(IN PKTRAP_FRAME TrapFrame,
|
||||
{
|
||||
/* This was normal kernel time */
|
||||
CurrentThread->KernelTime++;
|
||||
InterlockedIncrement(&CurrentProcess->KernelTime);
|
||||
InterlockedIncrement((PLONG)&CurrentProcess->KernelTime);
|
||||
}
|
||||
else if (Irql == DISPATCH_LEVEL)
|
||||
{
|
||||
|
||||
@@ -224,7 +224,7 @@ ObFastReplaceObject(IN PEX_FAST_REF FastRef,
|
||||
}
|
||||
|
||||
/* Switch objects */
|
||||
OldRef.Value = InterlockedExchange(&FastRef->Value, NewValue);
|
||||
OldRef.Value = InterlockedExchange((PLONG)&FastRef->Value, NewValue);
|
||||
OldObject = (PVOID)((ULONG_PTR)OldRef.Object &~ MAX_FAST_REFS);
|
||||
if ((OldObject) && (OldRef.RefCnt))
|
||||
{
|
||||
|
||||
@@ -477,6 +477,7 @@ NtSignalAndWaitForSingleObject(IN HANDLE ObjectHandleToSignal,
|
||||
!(HandleInfo.GrantedAccess & EVENT_MODIFY_STATE))
|
||||
{
|
||||
/* Fail: lack of rights */
|
||||
Status = STATUS_ACCESS_DENIED;
|
||||
goto Quickie;
|
||||
}
|
||||
|
||||
@@ -505,6 +506,7 @@ NtSignalAndWaitForSingleObject(IN HANDLE ObjectHandleToSignal,
|
||||
!(HandleInfo.GrantedAccess & SEMAPHORE_MODIFY_STATE))
|
||||
{
|
||||
/* Fail: lack of rights */
|
||||
Status = STATUS_ACCESS_DENIED;
|
||||
goto Quickie;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user