fix warning on optimized builds

svn path=/trunk/; revision=14367
This commit is contained in:
Thomas Bluemel 2005-03-28 17:25:19 +00:00
parent 903225f24e
commit e7986f168f

View file

@ -294,16 +294,19 @@ NtReleaseMutant(IN HANDLE MutantHandle,
IN PLONG PreviousCount OPTIONAL) IN PLONG PreviousCount OPTIONAL)
{ {
PKMUTANT Mutant; PKMUTANT Mutant;
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode(); KPROCESSOR_MODE PreviousMode;
NTSTATUS Status = STATUS_SUCCESS; NTSTATUS Status = STATUS_SUCCESS;
PAGED_CODE(); PAGED_CODE();
PreviousMode = ExGetPreviousMode();
DPRINT("NtReleaseMutant(MutantHandle 0%x PreviousCount 0%x)\n", DPRINT("NtReleaseMutant(MutantHandle 0%x PreviousCount 0%x)\n",
MutantHandle, MutantHandle,
PreviousCount); PreviousCount);
/* Check Output Safety */ /* Check Output Safety */
if(PreviousMode == UserMode && PreviousCount) { if(PreviousMode != KernelMode && PreviousCount) {
_SEH_TRY { _SEH_TRY {
@ -330,7 +333,7 @@ NtReleaseMutant(IN HANDLE MutantHandle,
/* Check for Success and release if such */ /* Check for Success and release if such */
if(NT_SUCCESS(Status)) { if(NT_SUCCESS(Status)) {
LONG Prev; LONG Prev = 0;
/* release the mutant. doing so might raise an exception which we're /* release the mutant. doing so might raise an exception which we're
required to catch! */ required to catch! */