From ed87d06c85a03628d9fcbee73f54218837855b4e Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Wed, 13 Nov 2013 12:36:05 +0000 Subject: [PATCH] [CLASSPNP] - Remove unused variables svn path=/trunk/; revision=60971 --- reactos/drivers/storage/classpnp/class.c | 12 ++---------- reactos/drivers/storage/classpnp/classwmi.c | 3 --- reactos/drivers/storage/classpnp/create.c | 2 -- reactos/drivers/storage/classpnp/obsolete.c | 2 -- reactos/drivers/storage/classpnp/power.c | 5 ----- reactos/drivers/storage/classpnp/xferpkt.c | 3 --- 6 files changed, 2 insertions(+), 25 deletions(-) diff --git a/reactos/drivers/storage/classpnp/class.c b/reactos/drivers/storage/classpnp/class.c index b53cc76b895..447d02694b3 100644 --- a/reactos/drivers/storage/classpnp/class.c +++ b/reactos/drivers/storage/classpnp/class.c @@ -539,14 +539,11 @@ ClassDispatchPnp( PCLASS_DEV_INFO devInfo; PIO_STACK_LOCATION irpStack = IoGetCurrentIrpStackLocation(Irp); - PIO_STACK_LOCATION nextIrpStack = IoGetNextIrpStackLocation(Irp); NTSTATUS status = Irp->IoStatus.Status; BOOLEAN completeRequest = TRUE; BOOLEAN lockReleased = FALSE; - ULONG isRemoved; - PAGED_CODE(); // @@ -566,7 +563,7 @@ ClassDispatchPnp( devInfo = &(initData->PdoData); } - isRemoved = ClassAcquireRemoveLock(DeviceObject, Irp); + ClassAcquireRemoveLock(DeviceObject, Irp); DebugPrint((2, "ClassDispatchPnp (%p,%p): minor code %#x for %s %p\n", DeviceObject, Irp, @@ -894,7 +891,6 @@ ClassDispatchPnp( case IRP_MN_REMOVE_DEVICE: case IRP_MN_SURPRISE_REMOVAL: { - PDEVICE_OBJECT lowerDeviceObject = commonExtension->LowerDeviceObject; UCHAR removeType = irpStack->MinorFunction; if (commonExtension->PagingPathCount != 0) { @@ -3003,7 +2999,6 @@ ClassInterpretSenseInfo( ) { PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = Fdo->DeviceExtension; - PCOMMON_DEVICE_EXTENSION commonExtension = Fdo->DeviceExtension; PCLASS_PRIVATE_FDO_DATA fdoData = fdoExtension->PrivateFdoData; PSENSE_DATA senseBuffer = Srb->SenseInfoBuffer; @@ -6559,7 +6554,6 @@ ClassPnpQueryFdoRelations( PCLASS_DRIVER_EXTENSION driverExtension = IoGetDriverObjectExtension(Fdo->DriverObject, CLASS_DRIVER_EXTENSION_KEY); - NTSTATUS status; PAGED_CODE(); @@ -6569,7 +6563,7 @@ ClassPnpQueryFdoRelations( // if(InterlockedIncrement((PLONG)&fdoExtension->EnumerationInterlock) == 1) { - status = driverExtension->InitData.ClassEnumerateDevice(Fdo); + driverExtension->InitData.ClassEnumerateDevice(Fdo); } Irp->IoStatus.Information = (ULONG_PTR) NULL; @@ -7330,7 +7324,6 @@ ClassUpdateInformationInRegistry( IN ULONG InquiryDataLength ) { - PFUNCTIONAL_DEVICE_EXTENSION fdoExtension; NTSTATUS status; SCSI_ADDRESS scsiAddress; OBJECT_ATTRIBUTES objectAttributes; @@ -7346,7 +7339,6 @@ ClassUpdateInformationInRegistry( PAGED_CODE(); ASSERT(DeviceName); - fdoExtension = Fdo->DeviceExtension; buffer = NULL; targetKey = NULL; RtlZeroMemory(&unicodeName, sizeof(UNICODE_STRING)); diff --git a/reactos/drivers/storage/classpnp/classwmi.c b/reactos/drivers/storage/classpnp/classwmi.c index f0a2de5e3de..c1462a1bcdf 100644 --- a/reactos/drivers/storage/classpnp/classwmi.c +++ b/reactos/drivers/storage/classpnp/classwmi.c @@ -562,17 +562,14 @@ ClassWmiCompleteRequest( IN CCHAR PriorityBoost ) { - PCOMMON_DEVICE_EXTENSION commonExtension = DeviceObject->DeviceExtension; PIO_STACK_LOCATION irpStack = IoGetCurrentIrpStackLocation(Irp); //UCHAR MinorFunction; PUCHAR buffer; ULONG retSize; UCHAR minorFunction; - ULONG bufferSize; minorFunction = irpStack->MinorFunction; buffer = (PUCHAR)irpStack->Parameters.WMI.Buffer; - bufferSize = irpStack->Parameters.WMI.BufferSize; switch(minorFunction) { diff --git a/reactos/drivers/storage/classpnp/create.c b/reactos/drivers/storage/classpnp/create.c index 11abd18ff4b..7a0c5fa1822 100644 --- a/reactos/drivers/storage/classpnp/create.c +++ b/reactos/drivers/storage/classpnp/create.c @@ -418,8 +418,6 @@ ClasspCleanupDisableMcn( PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = commonExtension->PartitionZeroExtension; - ULONG newCount = 1; - PAGED_CODE(); DebugPrint((ClassDebugTrace, diff --git a/reactos/drivers/storage/classpnp/obsolete.c b/reactos/drivers/storage/classpnp/obsolete.c index a289a913fe4..60862546f95 100644 --- a/reactos/drivers/storage/classpnp/obsolete.c +++ b/reactos/drivers/storage/classpnp/obsolete.c @@ -346,7 +346,6 @@ RetryRequest( ULONG RetryInterval ) { - PCOMMON_DEVICE_EXTENSION commonExtension = DeviceObject->DeviceExtension; PIO_STACK_LOCATION currentIrpStack = IoGetCurrentIrpStackLocation(Irp); PIO_STACK_LOCATION nextIrpStack = IoGetNextIrpStackLocation(Irp); ULONG transferByteCount; @@ -847,7 +846,6 @@ Return Value: --*/ { - PCLASS_PRIVATE_FDO_DATA privateData = FdoExtension->PrivateFdoData; PCOMMON_DEVICE_EXTENSION commonExt = &FdoExtension->CommonExtension; //KIRQL oldIrql; //PIRP blockedIrp; diff --git a/reactos/drivers/storage/classpnp/power.c b/reactos/drivers/storage/classpnp/power.c index f851c057365..9d307f00ac8 100644 --- a/reactos/drivers/storage/classpnp/power.c +++ b/reactos/drivers/storage/classpnp/power.c @@ -80,7 +80,6 @@ ClassDispatchPower( { PCOMMON_DEVICE_EXTENSION commonExtension = DeviceObject->DeviceExtension; ULONG isRemoved; - PCLASS_POWER_DEVICE powerRoutine = NULL; // // NOTE: This code may be called at PASSIVE or DISPATCH, depending @@ -88,8 +87,6 @@ ClassDispatchPower( // don't do anything that would break under either circumstance. // - //NTSTATUS status; - isRemoved = ClassAcquireRemoveLock(DeviceObject, Irp); if(isRemoved) { @@ -1508,8 +1505,6 @@ RetryPowerRequest( PCLASS_POWER_CONTEXT Context ) { - PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = DeviceObject->DeviceExtension; - PCOMMON_DEVICE_EXTENSION commonExtension = DeviceObject->DeviceExtension; PIO_STACK_LOCATION nextIrpStack = IoGetNextIrpStackLocation(Irp); PSCSI_REQUEST_BLOCK srb = &(Context->Srb); LARGE_INTEGER dueTime; diff --git a/reactos/drivers/storage/classpnp/xferpkt.c b/reactos/drivers/storage/classpnp/xferpkt.c index 1ec0ec58052..42b19c82951 100644 --- a/reactos/drivers/storage/classpnp/xferpkt.c +++ b/reactos/drivers/storage/classpnp/xferpkt.c @@ -720,7 +720,6 @@ VOID NTAPI SetupEjectionTransferPacket( TRANSFER_PACKET *Pkt, PIRP OriginalIrp) { PFUNCTIONAL_DEVICE_EXTENSION fdoExt = Pkt->Fdo->DeviceExtension; - PCLASS_PRIVATE_FDO_DATA fdoData = fdoExt->PrivateFdoData; PCDB pCdb; PAGED_CODE(); @@ -766,7 +765,6 @@ VOID NTAPI SetupModeSenseTransferPacket(TRANSFER_PACKET *Pkt, PIRP OriginalIrp) { PFUNCTIONAL_DEVICE_EXTENSION fdoExt = Pkt->Fdo->DeviceExtension; - PCLASS_PRIVATE_FDO_DATA fdoData = fdoExt->PrivateFdoData; PCDB pCdb; PAGED_CODE(); @@ -815,7 +813,6 @@ VOID NTAPI SetupDriveCapacityTransferPacket(TRANSFER_PACKET *Pkt, PIRP OriginalIrp) { PFUNCTIONAL_DEVICE_EXTENSION fdoExt = Pkt->Fdo->DeviceExtension; - PCLASS_PRIVATE_FDO_DATA fdoData = fdoExt->PrivateFdoData; PCDB pCdb; RtlZeroMemory(&Pkt->Srb, sizeof(SCSI_REQUEST_BLOCK));