|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 13/18] Fix inconsistent annotations
Warnings are raised on some functions that have inconsistent annotations with
types defined in wdm.h.
We trust wdm.h annotations and annotate them with _Use_decl_annotations_ to
sync the annotations.
Signed-off-by: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
---
src/xencrsh/driver.c | 13 +++++++------
src/xenvbd/adapter.c | 13 +++++++------
src/xenvbd/driver.c | 10 ++++++----
src/xenvbd/ring.c | 5 +++--
4 files changed, 23 insertions(+), 18 deletions(-)
diff --git a/src/xencrsh/driver.c b/src/xencrsh/driver.c
index 5874dea..743d942 100644
--- a/src/xencrsh/driver.c
+++ b/src/xencrsh/driver.c
@@ -191,14 +191,15 @@ HwAdapterControl(
HW_FIND_ADAPTER HwFindAdapter;
+_Use_decl_annotations_
ULONG
HwFindAdapter(
- _In_ PVOID HwDeviceExtension,
- _In_ PVOID Context,
- _In_ PVOID BusInformation,
- _In_ PSTR ArgumentString,
- _Inout_ PPORT_CONFIGURATION_INFORMATION ConfigInfo,
- _In_ PBOOLEAN Again
+ PVOID HwDeviceExtension,
+ PVOID Context,
+ PVOID BusInformation,
+ PSTR ArgumentString,
+ PPORT_CONFIGURATION_INFORMATION ConfigInfo,
+ PBOOLEAN Again
)
{
UNREFERENCED_PARAMETER(Context);
diff --git a/src/xenvbd/adapter.c b/src/xenvbd/adapter.c
index 5809af7..7158db0 100644
--- a/src/xenvbd/adapter.c
+++ b/src/xenvbd/adapter.c
@@ -2096,14 +2096,15 @@ AdapterHwAdapterControl(
HW_FIND_ADAPTER AdapterHwFindAdapter;
+_Use_decl_annotations_
ULONG
AdapterHwFindAdapter(
- _In_ PVOID DevExt,
- _In_ PVOID Context,
- _In_ PVOID BusInformation,
- _In_ PSTR ArgumentString,
- _Inout_ PPORT_CONFIGURATION_INFORMATION ConfigInfo,
- _In_ PBOOLEAN Again
+ PVOID DevExt,
+ PVOID Context,
+ PVOID BusInformation,
+ PSTR ArgumentString,
+ PPORT_CONFIGURATION_INFORMATION ConfigInfo,
+ PBOOLEAN Again
)
{
UNREFERENCED_PARAMETER(DevExt);
diff --git a/src/xenvbd/driver.c b/src/xenvbd/driver.c
index 1b6b191..44c660d 100644
--- a/src/xenvbd/driver.c
+++ b/src/xenvbd/driver.c
@@ -114,10 +114,11 @@ DriverDispatchPower(
_Dispatch_type_(IRP_MJ_PNP)
DRIVER_DISPATCH DispatchPnp;
+_Use_decl_annotations_
NTSTATUS
DispatchPnp(
- _In_ PDEVICE_OBJECT DeviceObject,
- _In_ PIRP Irp
+ PDEVICE_OBJECT DeviceObject,
+ PIRP Irp
)
{
if (Driver.Adapter == NULL)
@@ -129,10 +130,11 @@ DispatchPnp(
_Dispatch_type_(IRP_MJ_POWER)
DRIVER_DISPATCH DispatchPower;
+_Use_decl_annotations_
NTSTATUS
DispatchPower(
- _In_ PDEVICE_OBJECT DeviceObject,
- _In_ PIRP Irp
+ PDEVICE_OBJECT DeviceObject,
+ PIRP Irp
)
{
if (Driver.Adapter == NULL)
diff --git a/src/xenvbd/ring.c b/src/xenvbd/ring.c
index 1d8df78..31c8b65 100644
--- a/src/xenvbd/ring.c
+++ b/src/xenvbd/ring.c
@@ -1611,10 +1611,11 @@ BlkifRingReleaseLock(
KSERVICE_ROUTINE BlkifRingInterrupt;
+_Use_decl_annotations_
BOOLEAN
BlkifRingInterrupt(
- _In_ PKINTERRUPT InterruptObject,
- _In_ PVOID Argument
+ PKINTERRUPT InterruptObject,
+ PVOID Argument
)
{
PXENVBD_BLKIF_RING BlkifRing = Argument;
--
2.55.0.windows.5
--
Césaire Mounah | Vates Windows Guest Tools Engineer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |