From f06e2b532ca00e516480de5ca1f318c8333ca704 Mon Sep 17 00:00:00 2001 From: "KJK::Hyperion" Date: Fri, 19 Jun 2009 00:09:42 +0000 Subject: [PATCH] modified drivers/bus/pci/fdo.c modified drivers/bus/pci/pci.c modified drivers/bus/pci/pdo.c Silence "argument unused" warnings Corrected a potentially uninitialized variable access MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Samuel Serapión svn path=/trunk/; revision=41454 --- reactos/drivers/bus/pci/fdo.c | 6 +++++- reactos/drivers/bus/pci/pci.c | 2 ++ reactos/drivers/bus/pci/pdo.c | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/reactos/drivers/bus/pci/fdo.c b/reactos/drivers/bus/pci/fdo.c index 311b5862f37..35fd12536c7 100644 --- a/reactos/drivers/bus/pci/fdo.c +++ b/reactos/drivers/bus/pci/fdo.c @@ -176,7 +176,7 @@ FdoQueryBusRelations( IN PIRP Irp, PIO_STACK_LOCATION IrpSp) { - PPDO_DEVICE_EXTENSION PdoDeviceExtension; + PPDO_DEVICE_EXTENSION PdoDeviceExtension = NULL; PFDO_DEVICE_EXTENSION DeviceExtension; PDEVICE_RELATIONS Relations; PLIST_ENTRY CurrentEntry; @@ -187,6 +187,8 @@ FdoQueryBusRelations( ULONG Size; ULONG i; + UNREFERENCED_PARAMETER(IrpSp); + DPRINT("Called\n"); ErrorStatus = STATUS_INSUFFICIENT_RESOURCES; @@ -432,6 +434,8 @@ FdoSetPower( PFDO_DEVICE_EXTENSION DeviceExtension; NTSTATUS Status; + UNREFERENCED_PARAMETER(Irp); + DPRINT("Called\n"); DeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; diff --git a/reactos/drivers/bus/pci/pci.c b/reactos/drivers/bus/pci/pci.c index 1bc6b74ff8e..25621e4ff8a 100644 --- a/reactos/drivers/bus/pci/pci.c +++ b/reactos/drivers/bus/pci/pci.c @@ -52,6 +52,7 @@ PciDispatchDeviceControl( PIO_STACK_LOCATION IrpSp; NTSTATUS Status; + UNREFERENCED_PARAMETER(DeviceObject); DPRINT("Called. IRP is at (0x%X)\n", Irp); Irp->IoStatus.Information = 0; @@ -188,6 +189,7 @@ DriverEntry( { NTSTATUS Status; + UNREFERENCED_PARAMETER(RegistryPath); DPRINT("Peripheral Component Interconnect Bus Driver\n"); DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = PciDispatchDeviceControl; diff --git a/reactos/drivers/bus/pci/pdo.c b/reactos/drivers/bus/pci/pdo.c index 367019ada88..fb571c32a15 100644 --- a/reactos/drivers/bus/pci/pdo.c +++ b/reactos/drivers/bus/pci/pdo.c @@ -132,6 +132,7 @@ PdoQueryBusInformation( PFDO_DEVICE_EXTENSION FdoDeviceExtension; PPNP_BUS_INFORMATION BusInformation; + UNREFERENCED_PARAMETER(IrpSp); DPRINT("Called\n"); DeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; @@ -161,6 +162,7 @@ PdoQueryCapabilities( PDEVICE_CAPABILITIES DeviceCapabilities; ULONG DeviceNumber, FunctionNumber; + UNREFERENCED_PARAMETER(Irp); DPRINT("Called\n"); DeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; @@ -319,6 +321,7 @@ PdoQueryResourceRequirements( ULONG Length; ULONG Flags; + UNREFERENCED_PARAMETER(IrpSp); DPRINT("PdoQueryResourceRequirements() called\n"); DeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; @@ -630,6 +633,7 @@ PdoQueryResources( DPRINT("PdoQueryResources() called\n"); + UNREFERENCED_PARAMETER(IrpSp); DeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; /* Get PCI configuration space */ @@ -1121,6 +1125,7 @@ PdoQueryInterface( { NTSTATUS Status; + UNREFERENCED_PARAMETER(Irp); if (RtlCompareMemory(IrpSp->Parameters.QueryInterface.InterfaceType, &GUID_BUS_INTERFACE_STANDARD, sizeof(GUID)) == sizeof(GUID)) { @@ -1252,6 +1257,7 @@ PdoSetPower( PPDO_DEVICE_EXTENSION DeviceExtension; NTSTATUS Status; + UNREFERENCED_PARAMETER(Irp); DPRINT("Called\n"); DeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;