[ros-diffs] [greatlrd] 23041: patch from w3seek :Bug #: 1667 : NTOSKRNL: Fix GCC4 warning and return correct error code in NtSignalAndWaitForSingleObject

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Thu Jul 13 14:30:56 CEST 2006


Author: greatlrd
Date: Thu Jul 13 16:30:56 2006
New Revision: 23041

URL: http://svn.reactos.org/svn/reactos?rev=23041&view=rev
Log:
patch from w3seek :Bug #:  1667  : NTOSKRNL: Fix GCC4 warning and return correct error code in NtSignalAndWaitForSingleObject

Modified:
    trunk/reactos/ntoskrnl/ke/clock.c
    trunk/reactos/ntoskrnl/ob/obref.c
    trunk/reactos/ntoskrnl/ob/obwait.c

Modified: trunk/reactos/ntoskrnl/ke/clock.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/clock.c?rev=23041&r1=23040&r2=23041&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ke/clock.c (original)
+++ trunk/reactos/ntoskrnl/ke/clock.c Thu Jul 13 16:30:56 2006
@@ -261,7 +261,7 @@
     {
         /* Update user times */
         CurrentThread->UserTime++;
-        InterlockedIncrement(&CurrentProcess->UserTime);
+        InterlockedIncrement((PLONG)&CurrentProcess->UserTime);
         Prcb->UserTime++;
     }
     else
@@ -276,7 +276,7 @@
         {
             /* This was normal kernel time */
             CurrentThread->KernelTime++;
-            InterlockedIncrement(&CurrentProcess->KernelTime);
+            InterlockedIncrement((PLONG)&CurrentProcess->KernelTime);
         }
         else if (Irql == DISPATCH_LEVEL)
         {

Modified: trunk/reactos/ntoskrnl/ob/obref.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obref.c?rev=23041&r1=23040&r2=23041&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obref.c (original)
+++ trunk/reactos/ntoskrnl/ob/obref.c Thu Jul 13 16:30:56 2006
@@ -224,7 +224,7 @@
     }
 
     /* 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))
     {

Modified: trunk/reactos/ntoskrnl/ob/obwait.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obwait.c?rev=23041&r1=23040&r2=23041&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obwait.c (original)
+++ trunk/reactos/ntoskrnl/ob/obwait.c Thu Jul 13 16:30:56 2006
@@ -477,6 +477,7 @@
             !(HandleInfo.GrantedAccess & EVENT_MODIFY_STATE))
         {
             /* Fail: lack of rights */
+            Status = STATUS_ACCESS_DENIED;
             goto Quickie;
         }
 
@@ -505,6 +506,7 @@
             !(HandleInfo.GrantedAccess & SEMAPHORE_MODIFY_STATE))
         {
             /* Fail: lack of rights */
+            Status = STATUS_ACCESS_DENIED;
             goto Quickie;
         }
 




More information about the Ros-diffs mailing list