From 4c9511554d9c0aec52c76bd64198de45ce524cc9 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Sun, 17 Oct 2021 13:11:42 +0200 Subject: [PATCH] driver: address Code Analysis warnings Signed-off-by: Simon Rozman --- driver/wintun.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driver/wintun.c b/driver/wintun.c index 1969854..ec753a4 100644 --- a/driver/wintun.c +++ b/driver/wintun.c @@ -873,7 +873,7 @@ TunDispatchClose(DEVICE_OBJECT *DeviceObject, IRP *Irp) } _Dispatch_type_(IRP_MJ_PNP) -static DRIVER_DISPATCH_PAGED DispatchPnp; +static DRIVER_DISPATCH_PAGED TunDispatchPnp; _Use_decl_annotations_ static NTSTATUS TunDispatchPnp(DEVICE_OBJECT *DeviceObject, IRP *Irp) @@ -882,6 +882,7 @@ TunDispatchPnp(DEVICE_OBJECT *DeviceObject, IRP *Irp) if (Stack->MinorFunction != IRP_MN_QUERY_REMOVE_DEVICE && Stack->MinorFunction != IRP_MN_SURPRISE_REMOVAL) goto ndisDispatch; +#pragma warning(suppress : 28175) TUN_CTX *Ctx = DeviceObject->Reserved; if (!Ctx) goto ndisDispatch;