Author: fireball Date: Mon Jul 10 15:42:28 2006 New Revision: 22993
URL: http://svn.reactos.org/svn/reactos?rev=22993&view=rev Log: Thomas Weidenmueller: Fix GCC4 warnings
Modified: trunk/reactos/ntoskrnl/include/internal/io_x.h trunk/reactos/ntoskrnl/io/iomgr/error.c trunk/reactos/ntoskrnl/io/iomgr/file.c trunk/reactos/ntoskrnl/io/iomgr/irp.c trunk/reactos/ntoskrnl/ps/kill.c trunk/reactos/ntoskrnl/ps/process.c trunk/reactos/ntoskrnl/ps/thread.c
Modified: trunk/reactos/ntoskrnl/include/internal/io_x.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/i... ============================================================================== --- trunk/reactos/ntoskrnl/include/internal/io_x.h (original) +++ trunk/reactos/ntoskrnl/include/internal/io_x.h Mon Jul 10 15:42:28 2006 @@ -11,7 +11,7 @@ IopLockFileObject(IN PFILE_OBJECT FileObject) { /* Lock the FO and check for contention */ - if (InterlockedExchange(&FileObject->Busy, TRUE)) + if (InterlockedExchange((PLONG)&FileObject->Busy, TRUE)) { /* FIXME: Implement contention case */ KEBUGCHECK(0); @@ -23,7 +23,7 @@ IopUnlockFileObject(IN PFILE_OBJECT FileObject) { /* Unlock the FO and wake any waiters up */ - InterlockedExchange(&FileObject->Busy, FALSE); + InterlockedExchange((PLONG)&FileObject->Busy, FALSE); if (FileObject->Waiters) KeSetEvent(&FileObject->Lock, 0, FALSE); }
Modified: trunk/reactos/ntoskrnl/io/iomgr/error.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/error.c?r... ============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/error.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/error.c Mon Jul 10 15:42:28 2006 @@ -243,6 +243,8 @@ DriverNameString.Buffer = DriverObject->DriverName.Buffer; DriverNameLength = DriverObject->DriverName.Length; } + else + DriverNameString.Buffer = NULL;
/* Check if there isn't a valid name*/ if (!DriverNameLength)
Modified: trunk/reactos/ntoskrnl/io/iomgr/file.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/file.c?re... ============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/file.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/file.c Mon Jul 10 15:42:28 2006 @@ -117,7 +117,7 @@ Vpb = OpenPacket->RelatedFileObject->Vpb;
/* Reference it */ - InterlockedIncrement(&Vpb->ReferenceCount); + InterlockedIncrement((PLONG)&Vpb->ReferenceCount); } } else @@ -467,7 +467,7 @@
/* And re-associate with the actual one */ Vpb = FileObject->Vpb; - if (Vpb) InterlockedIncrement(&Vpb->ReferenceCount); + if (Vpb) InterlockedIncrement((PLONG)&Vpb->ReferenceCount); }
/* Make sure we are not using a dummy */
Modified: trunk/reactos/ntoskrnl/io/iomgr/irp.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/irp.c?rev... ============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/irp.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/irp.c Mon Jul 10 15:42:28 2006 @@ -1474,12 +1474,11 @@ IoIsOperationSynchronous(IN PIRP Irp) { /* Check the flags */ - if (((Irp->Flags & IRP_SYNCHRONOUS_PAGING_IO) && - (!(Irp->Flags & IRP_PAGING_IO) && - !(Irp->Flags & IRP_SYNCHRONOUS_PAGING_IO))) || - (Irp->Flags & IRP_SYNCHRONOUS_API) || - (IoGetCurrentIrpStackLocation(Irp)->FileObject->Flags & - FO_SYNCHRONOUS_IO)) + if (!(Irp->Flags & (IRP_PAGING_IO | IRP_SYNCHRONOUS_PAGING_IO)) && + ((Irp->Flags & IRP_SYNCHRONOUS_PAGING_IO) || + (Irp->Flags & IRP_SYNCHRONOUS_API) || + (IoGetCurrentIrpStackLocation(Irp)->FileObject->Flags & + FO_SYNCHRONOUS_IO))) { /* Synch API or Paging I/O is OK, as is Sync File I/O */ return TRUE;
Modified: trunk/reactos/ntoskrnl/ps/kill.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/kill.c?rev=2299... ============================================================================== --- trunk/reactos/ntoskrnl/ps/kill.c (original) +++ trunk/reactos/ntoskrnl/ps/kill.c Mon Jul 10 15:42:28 2006 @@ -50,7 +50,7 @@ }
/* Set the delete flag */ - InterlockedOr(&Process->Flags, 8); + InterlockedOr((PLONG)&Process->Flags, 8);
/* Get the first thread */ while ((Thread = PsGetNextProcessThread(Process, Thread))) @@ -401,7 +401,7 @@ if (!(--CurrentProcess->ActiveThreads)) { /* Set the delete flag */ - InterlockedOr(&CurrentProcess->Flags, 8); + InterlockedOr((PLONG)&CurrentProcess->Flags, 8);
/* Remember we are last */ Last = TRUE; @@ -586,7 +586,7 @@ CmNotifyRunDown(Thread); */
/* Clear NPX Thread */ - InterlockedCompareExchangePointer(&KeGetCurrentPrcb()->NpxThread, NULL, Thread); + (void)InterlockedCompareExchangePointer(&KeGetCurrentPrcb()->NpxThread, NULL, Thread);
/* Rundown Mutexes */ KeRundownThread(); @@ -829,7 +829,7 @@ ASSERT_IRQL(PASSIVE_LEVEL);
/* Mark it as terminated */ - InterlockedOr(&Thread->CrossThreadFlags, 1); + InterlockedOr((PLONG)&Thread->CrossThreadFlags, 1);
/* Directly terminate the thread */ PspExitThread(ExitStatus); @@ -849,7 +849,7 @@ Flags = Thread->CrossThreadFlags | 1;
/* Set it, and check if it was already set while we were running */ - if (!(InterlockedExchange(&Thread->CrossThreadFlags, Flags) & 1)) + if (!(InterlockedExchange((PLONG)&Thread->CrossThreadFlags, Flags) & 1)) { /* Initialize a Kernel Mode APC to Kill the Thread */ KeInitializeApc(Apc, @@ -894,7 +894,7 @@ DPRINT1("PspExitProcess %p\n", Process);
/* Set Process Delete flag */ - InterlockedOr(&Process->Flags, 4); + InterlockedOr((PLONG)&Process->Flags, 4);
/* Check if we are the last thread */ if (LastThread) @@ -991,7 +991,7 @@ PsLockProcess(Process, FALSE);
/* Set the exit flag */ - if (!KillByHandle) InterlockedOr(&Process->Flags, 8); + if (!KillByHandle) InterlockedOr((PLONG)&Process->Flags, 8);
/* Get the first thread */ Status = STATUS_NOTHING_TO_TERMINATE;
Modified: trunk/reactos/ntoskrnl/ps/process.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/process.c?rev=2... ============================================================================== --- trunk/reactos/ntoskrnl/ps/process.c (original) +++ trunk/reactos/ntoskrnl/ps/process.c Mon Jul 10 15:42:28 2006 @@ -428,7 +428,7 @@ Process->DebugPort = DebugObject;
/* Check if the caller doesn't want the debug stuff inherited */ - if (Flags & PS_NO_DEBUG_INHERIT) InterlockedOr(&Process->Flags, 2); + if (Flags & PS_NO_DEBUG_INHERIT) InterlockedOr((PLONG)&Process->Flags, 2); } else { @@ -477,7 +477,7 @@ &DirectoryTableBase);
/* We now have an address space */ - InterlockedOr(&Process->Flags, 0x40000); + InterlockedOr((PLONG)&Process->Flags, 0x40000);
/* Set the maximum WS */ Process->Vm.MaximumWorkingSetSize = MaxWs;
Modified: trunk/reactos/ntoskrnl/ps/thread.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/thread.c?rev=22... ============================================================================== --- trunk/reactos/ntoskrnl/ps/thread.c (original) +++ trunk/reactos/ntoskrnl/ps/thread.c Mon Jul 10 15:42:28 2006 @@ -283,7 +283,7 @@ { /* System Thread */ Thread->StartAddress = StartRoutine; - InterlockedOr(&Thread->CrossThreadFlags, 0x10); + InterlockedOr((PLONG)&Thread->CrossThreadFlags, 0x10);
/* Let the kernel intialize the Thread */ KeInitializeThread(&Process->Pcb,