mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Thomas Weidenmueller: Fix GCC4 warnings
svn path=/trunk/; revision=22993
This commit is contained in:
parent
c3ecaa36f1
commit
6f20e7b31b
7 changed files with 21 additions and 20 deletions
|
@ -11,7 +11,7 @@ static __inline
|
|||
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 @@ static __inline
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -243,6 +243,8 @@ IopLogWorker(IN PVOID Parameter)
|
|||
DriverNameString.Buffer = DriverObject->DriverName.Buffer;
|
||||
DriverNameLength = DriverObject->DriverName.Length;
|
||||
}
|
||||
else
|
||||
DriverNameString.Buffer = NULL;
|
||||
|
||||
/* Check if there isn't a valid name*/
|
||||
if (!DriverNameLength)
|
||||
|
|
|
@ -117,7 +117,7 @@ IopParseDevice(IN PVOID ParseObject,
|
|||
Vpb = OpenPacket->RelatedFileObject->Vpb;
|
||||
|
||||
/* Reference it */
|
||||
InterlockedIncrement(&Vpb->ReferenceCount);
|
||||
InterlockedIncrement((PLONG)&Vpb->ReferenceCount);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -467,7 +467,7 @@ IopParseDevice(IN PVOID ParseObject,
|
|||
|
||||
/* 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 */
|
||||
|
|
|
@ -1474,12 +1474,11 @@ NTAPI
|
|||
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;
|
||||
|
|
|
@ -50,7 +50,7 @@ PspTerminateProcess(IN PEPROCESS Process,
|
|||
}
|
||||
|
||||
/* 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 @@ PspExitThread(NTSTATUS ExitStatus)
|
|||
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 @@ TryAgain2:
|
|||
CmNotifyRunDown(Thread); */
|
||||
|
||||
/* Clear NPX Thread */
|
||||
InterlockedCompareExchangePointer(&KeGetCurrentPrcb()->NpxThread, NULL, Thread);
|
||||
(void)InterlockedCompareExchangePointer(&KeGetCurrentPrcb()->NpxThread, NULL, Thread);
|
||||
|
||||
/* Rundown Mutexes */
|
||||
KeRundownThread();
|
||||
|
@ -829,7 +829,7 @@ PspTerminateThreadByPointer(PETHREAD Thread,
|
|||
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 @@ PspTerminateThreadByPointer(PETHREAD Thread,
|
|||
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 @@ PspExitProcess(IN BOOLEAN LastThread,
|
|||
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 @@ NtTerminateProcess(IN HANDLE ProcessHandle OPTIONAL,
|
|||
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;
|
||||
|
|
|
@ -428,7 +428,7 @@ PspCreateProcess(OUT PHANDLE ProcessHandle,
|
|||
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 @@ PspCreateProcess(OUT PHANDLE ProcessHandle,
|
|||
&DirectoryTableBase);
|
||||
|
||||
/* We now have an address space */
|
||||
InterlockedOr(&Process->Flags, 0x40000);
|
||||
InterlockedOr((PLONG)&Process->Flags, 0x40000);
|
||||
|
||||
/* Set the maximum WS */
|
||||
Process->Vm.MaximumWorkingSetSize = MaxWs;
|
||||
|
|
|
@ -283,7 +283,7 @@ PspCreateThread(OUT PHANDLE ThreadHandle,
|
|||
{
|
||||
/* System Thread */
|
||||
Thread->StartAddress = StartRoutine;
|
||||
InterlockedOr(&Thread->CrossThreadFlags, 0x10);
|
||||
InterlockedOr((PLONG)&Thread->CrossThreadFlags, 0x10);
|
||||
|
||||
/* Let the kernel intialize the Thread */
|
||||
KeInitializeThread(&Process->Pcb,
|
||||
|
|
Loading…
Reference in a new issue