mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 00:43:00 -05:00
sys: fix issues found by static analyzer
This commit is contained in:
parent
7f084787e3
commit
8fa337ae54
@ -70,7 +70,7 @@ FSP_FSEXT_PROVIDER *FspFsextProvider(UINT32 FsextControlCode, PNTSTATUS PLoadRes
|
||||
|
||||
RtlInitEmptyUnicodeString(&Path, Buf, sizeof Buf);
|
||||
Result = RtlUnicodeStringPrintf(&Path,
|
||||
L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\%s", Value.V.Data);
|
||||
L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\%s", (PWSTR)Value.V.Data);
|
||||
ASSERT(NT_SUCCESS(Result));
|
||||
|
||||
Result = ZwLoadDriver(&Path);
|
||||
|
@ -275,6 +275,7 @@ NTSTATUS FspMupHandleIrp(
|
||||
if (FspFileNodeIsValid(FileObject->FsContext))
|
||||
FsvolDeviceObject = ((FSP_FILE_NODE *)FileObject->FsContext)->FsvolDeviceObject;
|
||||
else if (0 != FileObject->FsContext2 &&
|
||||
#pragma prefast(disable:28175, "We are a filesystem: ok to access DeviceObject->Type")
|
||||
3 == ((PDEVICE_OBJECT)FileObject->FsContext2)->Type &&
|
||||
0 != ((PDEVICE_OBJECT)FileObject->FsContext2)->DeviceExtension &&
|
||||
FspFsvolDeviceExtensionKind == FspDeviceExtension((PDEVICE_OBJECT)FileObject->FsContext2)->Kind)
|
||||
|
@ -350,9 +350,9 @@ NTSTATUS FspSendSetInformationIrp(PDEVICE_OBJECT DeviceObject, PFILE_OBJECT File
|
||||
IrpSp->Parameters.SetFile.FileInformationClass = FileInformationClass;
|
||||
IrpSp->Parameters.SetFile.Length = Length;
|
||||
|
||||
KeInitializeEvent(&Context.Event, NotificationEvent, FALSE);
|
||||
IoSetCompletionRoutine(Irp, FspSendIrpCompletion, &Context, TRUE, TRUE, TRUE);
|
||||
|
||||
KeInitializeEvent(&Context.Event, NotificationEvent, FALSE);
|
||||
Result = IoCallDriver(DeviceObject, Irp);
|
||||
if (STATUS_PENDING == Result)
|
||||
KeWaitForSingleObject(&Context.Event, Executive, KernelMode, FALSE, 0);
|
||||
@ -391,9 +391,9 @@ NTSTATUS FspSendQuerySecurityIrp(PDEVICE_OBJECT DeviceObject, PFILE_OBJECT FileO
|
||||
IrpSp->Parameters.QuerySecurity.SecurityInformation = SecurityInformation;
|
||||
IrpSp->Parameters.QuerySecurity.Length = Length;
|
||||
|
||||
KeInitializeEvent(&Context.Event, NotificationEvent, FALSE);
|
||||
IoSetCompletionRoutine(Irp, FspSendIrpCompletion, &Context, TRUE, TRUE, TRUE);
|
||||
|
||||
KeInitializeEvent(&Context.Event, NotificationEvent, FALSE);
|
||||
Result = IoCallDriver(DeviceObject, Irp);
|
||||
if (STATUS_PENDING == Result)
|
||||
KeWaitForSingleObject(&Context.Event, Executive, KernelMode, FALSE, 0);
|
||||
@ -433,9 +433,9 @@ NTSTATUS FspSendQueryEaIrp(PDEVICE_OBJECT DeviceObject, PFILE_OBJECT FileObject,
|
||||
IrpSp->Parameters.QueryEa.EaList = GetEa;
|
||||
IrpSp->Parameters.QueryEa.EaListLength = GetEaLength;
|
||||
|
||||
KeInitializeEvent(&Context.Event, NotificationEvent, FALSE);
|
||||
IoSetCompletionRoutine(Irp, FspSendIrpCompletion, &Context, TRUE, TRUE, TRUE);
|
||||
|
||||
KeInitializeEvent(&Context.Event, NotificationEvent, FALSE);
|
||||
Result = IoCallDriver(DeviceObject, Irp);
|
||||
if (STATUS_PENDING == Result)
|
||||
KeWaitForSingleObject(&Context.Event, Executive, KernelMode, FALSE, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user