sys: fix some prefast suggestions

This commit is contained in:
Bill Zissimopoulos 2016-04-11 15:27:34 -07:00
parent 430f47945d
commit 220208cf87
3 changed files with 4 additions and 1 deletions

View File

@ -206,6 +206,7 @@ VOID FspDeviceDelete(PDEVICE_OBJECT DeviceObject)
}
#if DBG
#pragma prefast(suppress:28175, "Debugging only: ok to access DeviceObject->Size")
RtlFillMemory(&DeviceExtension->Kind,
(PUINT8)DeviceObject + DeviceObject->Size - (PUINT8)&DeviceExtension->Kind, 0xBD);
#endif

View File

@ -793,6 +793,7 @@ NTSTATUS FspSafeMdlCreate(PMDL UserMdl, LOCK_OPERATION Operation, FSP_SAFE_MDL *
Result = STATUS_INSUFFICIENT_RESOURCES;
goto exit;
}
#pragma prefast(suppress:28145, "We are a filesystem: ok to access MdlFlags")
SafeMdl->Mdl->MdlFlags |= MDL_PAGES_LOCKED;
UserPfnArray = MmGetMdlPfnArray(UserMdl);
SafePfnArray = MmGetMdlPfnArray(SafeMdl->Mdl);

View File

@ -23,7 +23,6 @@ FSP_DRIVER_DISPATCH FspWrite;
#ifdef ALLOC_PRAGMA
#pragma alloc_text(PAGE, FspFsvolWrite)
#pragma alloc_text(PAGE, FspFsvolWriteCached)
#pragma alloc_text(PAGE, FspFsvolWriteCachedDeferred)
#pragma alloc_text(PAGE, FspFsvolWriteNonCached)
#pragma alloc_text(PAGE, FspFsvolWritePrepare)
#pragma alloc_text(PAGE, FspFsvolWriteComplete)
@ -235,6 +234,8 @@ cleanup:
static VOID FspFsvolWriteCachedDeferred(PVOID Context1, PVOID Context2)
{
// !PAGED_CODE();
FspWqPostIrpWorkItem(Context1);
}