Remove some warnings

svn path=/trunk/; revision=33297
This commit is contained in:
Hervé Poussineau 2008-05-05 14:50:43 +00:00
parent 8ccb84366b
commit 61fe294be5
18 changed files with 21 additions and 133 deletions

View file

@ -130,8 +130,9 @@ extern Ext2Data Ext2GlobalData;
} }
#ifdef EXT2_POOL_WITH_TAG #ifdef EXT2_POOL_WITH_TAG
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
#define Ext2AllocatePool(PoolType,NumberOfBytes) \ #define Ext2AllocatePool(PoolType,NumberOfBytes) \
ExAllocatePoolWithTag( PoolType, NumberOfBytes, '2txE' ) ExAllocatePoolWithTag( PoolType, NumberOfBytes, TAG ( 'E','x','t','2' ) )
#else #else
#define Ext2AllocatePool(PoolType,NumberOfBytes) \ #define Ext2AllocatePool(PoolType,NumberOfBytes) \
ExAllocatePool( PoolType, NumberOfBytes ) ExAllocatePool( PoolType, NumberOfBytes )

View file

@ -113,12 +113,10 @@ BOOLEAN FirstAttempt )
PtrExt2VCB PtrVCB = NULL; PtrExt2VCB PtrVCB = NULL;
PtrExt2NTRequiredFCB PtrReqdFCB = NULL; PtrExt2NTRequiredFCB PtrReqdFCB = NULL;
PERESOURCE PtrResourceAcquired = NULL; PERESOURCE PtrResourceAcquired = NULL;
IO_STATUS_BLOCK LocalIoStatus;
BOOLEAN CompleteIrp = TRUE; BOOLEAN CompleteIrp = TRUE;
BOOLEAN PostRequest = FALSE; BOOLEAN PostRequest = FALSE;
BOOLEAN AcquiredVCB = FALSE; BOOLEAN AcquiredVCB = FALSE;
BOOLEAN CanWait = FALSE;
BOOLEAN BlockForResource; BOOLEAN BlockForResource;
int i = 1; int i = 1;

View file

@ -115,12 +115,10 @@ BOOLEAN FirstAttempt )
PtrExt2VCB PtrVCB = NULL; PtrExt2VCB PtrVCB = NULL;
PtrExt2NTRequiredFCB PtrReqdFCB = NULL; PtrExt2NTRequiredFCB PtrReqdFCB = NULL;
PERESOURCE PtrResourceAcquired = NULL; PERESOURCE PtrResourceAcquired = NULL;
IO_STATUS_BLOCK LocalIoStatus;
BOOLEAN CompleteIrp = TRUE; BOOLEAN CompleteIrp = TRUE;
BOOLEAN PostRequest = FALSE; BOOLEAN PostRequest = FALSE;
BOOLEAN AcquiredVCB = FALSE; BOOLEAN AcquiredVCB = FALSE;
BOOLEAN CanWait = FALSE;
BOOLEAN BlockForResource; BOOLEAN BlockForResource;
int i = 1; int i = 1;

View file

@ -180,8 +180,6 @@ BOOLEAN FirstAttempt)
UNICODE_STRING AbsolutePathName; UNICODE_STRING AbsolutePathName;
UNICODE_STRING RenameLinkTargetFileName; UNICODE_STRING RenameLinkTargetFileName;
LARGE_INTEGER FileAllocationSize, FileEndOfFile;
ASSERT(PtrIrpContext); ASSERT(PtrIrpContext);
ASSERT(PtrIrp); ASSERT(PtrIrp);
@ -472,12 +470,10 @@ BOOLEAN FirstAttempt)
UNICODE_STRING RemainingName; UNICODE_STRING RemainingName;
UNICODE_STRING CurrentName; UNICODE_STRING CurrentName;
UNICODE_STRING NextRemainingName; UNICODE_STRING NextRemainingName;
PEXT2_INODE PtrNextInode = NULL;
ULONG CurrInodeNo = 0; ULONG CurrInodeNo = 0;
PtrExt2FCB PtrCurrFCB = NULL; PtrExt2FCB PtrCurrFCB = NULL;
PtrExt2FCB PtrNextFCB = NULL; PtrExt2FCB PtrNextFCB = NULL;
PFILE_OBJECT PtrCurrFileObject = NULL; PFILE_OBJECT PtrCurrFileObject = NULL;
UINT NameBufferIndex;
ULONG Type = 0; ULONG Type = 0;
LARGE_INTEGER ZeroSize; LARGE_INTEGER ZeroSize;
BOOLEAN Found = FALSE; BOOLEAN Found = FALSE;
@ -527,7 +523,6 @@ BOOLEAN FirstAttempt)
if( OpenTargetDirectory ) if( OpenTargetDirectory )
{ {
int i;
// //
// This is for a rename/move operation... // This is for a rename/move operation...
// //
@ -580,10 +575,10 @@ BOOLEAN FirstAttempt)
// Quit searching... // Quit searching...
// //
if( ( NextRemainingName.Length == 0 ) && if( ( NextRemainingName.Length == 0 ) && (
( RequestedDisposition == FILE_CREATE ) || ( RequestedDisposition == FILE_CREATE ) ||
( RequestedDisposition == FILE_OPEN_IF) || ( RequestedDisposition == FILE_OPEN_IF) ||
( RequestedDisposition == FILE_OVERWRITE_IF) ) ( RequestedDisposition == FILE_OVERWRITE_IF) ) )
{ {
// //
@ -618,7 +613,6 @@ BOOLEAN FirstAttempt)
} }
else if( NextRemainingName.Length == 0 && OpenTargetDirectory ) else if( NextRemainingName.Length == 0 && OpenTargetDirectory )
{ {
int i;
// //
// This is for a rename/move operation... // This is for a rename/move operation...
// Just the last component was not found... // Just the last component was not found...
@ -1163,7 +1157,6 @@ PtrExt2FCB NTAPI Ext2LocateChildFCBInCore(
{ {
PtrExt2FCB PtrFCB = NULL; PtrExt2FCB PtrFCB = NULL;
ULONG InodeNo = 0;
PLIST_ENTRY PtrEntry; PLIST_ENTRY PtrEntry;
if( IsListEmpty( &(PtrVCB->FCBListHead) ) ) if( IsListEmpty( &(PtrVCB->FCBListHead) ) )
@ -1222,7 +1215,6 @@ ULONG NTAPI Ext2LocateFileInDisk (
ULONG *Type ) ULONG *Type )
{ {
PtrExt2FCB PtrNewFCB = NULL;
PFILE_OBJECT PtrFileObject = NULL; PFILE_OBJECT PtrFileObject = NULL;
ULONG InodeNo = 0; ULONG InodeNo = 0;
@ -1637,7 +1629,6 @@ BOOLEAN NTAPI Ext2SupersedeFile(
{ {
EXT2_INODE Inode; EXT2_INODE Inode;
PtrExt2VCB PtrVCB = PtrFCB->PtrVCB; PtrExt2VCB PtrVCB = PtrFCB->PtrVCB;
ULONG i;
Ext2InitializeFCBInodeInfo( PtrFCB ); Ext2InitializeFCBInodeInfo( PtrFCB );

View file

@ -125,7 +125,6 @@ PIRP PtrIrp)
PtrExt2CCB PtrCCB = NULL; PtrExt2CCB PtrCCB = NULL;
PtrExt2VCB PtrVCB = NULL; PtrExt2VCB PtrVCB = NULL;
ULONG IoControlCode = 0; ULONG IoControlCode = 0;
void *BufferPointer = NULL;
try try
{ {
@ -165,9 +164,6 @@ PIRP PtrIrp)
IoSetCompletionRoutine(PtrIrp, Ext2DevIoctlCompletion, NULL, TRUE, TRUE, TRUE); IoSetCompletionRoutine(PtrIrp, Ext2DevIoctlCompletion, NULL, TRUE, TRUE, TRUE);
// Send the request. // Send the request.
RC = IoCallDriver(PtrVCB->TargetDeviceObject, PtrIrp); RC = IoCallDriver(PtrVCB->TargetDeviceObject, PtrIrp);
try_exit: NOTHING;
} }
finally finally
{ {

View file

@ -109,7 +109,6 @@ PIRP PtrIrp)
PFILE_OBJECT PtrFileObject = NULL; PFILE_OBJECT PtrFileObject = NULL;
PtrExt2FCB PtrFCB = NULL; PtrExt2FCB PtrFCB = NULL;
PtrExt2CCB PtrCCB = NULL; PtrExt2CCB PtrCCB = NULL;
PtrExt2VCB PtrVCB = NULL;
// First, get a pointer to the current I/O stack location // First, get a pointer to the current I/O stack location
PtrIoStackLocation = IoGetCurrentIrpStackLocation(PtrIrp); PtrIoStackLocation = IoGetCurrentIrpStackLocation(PtrIrp);
@ -189,7 +188,6 @@ PtrExt2FCB PtrFCB,
PtrExt2CCB PtrCCB) PtrExt2CCB PtrCCB)
{ {
NTSTATUS RC = STATUS_SUCCESS; NTSTATUS RC = STATUS_SUCCESS;
BOOLEAN CompleteRequest = TRUE;
BOOLEAN PostRequest = FALSE; BOOLEAN PostRequest = FALSE;
PtrExt2NTRequiredFCB PtrReqdFCB = NULL; PtrExt2NTRequiredFCB PtrReqdFCB = NULL;
BOOLEAN CanWait = FALSE; BOOLEAN CanWait = FALSE;
@ -212,9 +210,7 @@ PtrExt2CCB PtrCCB)
BOOLEAN SearchWithWildCards = FALSE; BOOLEAN SearchWithWildCards = FALSE;
PFILE_BOTH_DIR_INFORMATION BothDirInformation = NULL; PFILE_BOTH_DIR_INFORMATION BothDirInformation = NULL;
PFILE_FULL_DIR_INFORMATION FullDirInformation = NULL;
PFILE_DIRECTORY_INFORMATION DirectoryInformation = NULL; PFILE_DIRECTORY_INFORMATION DirectoryInformation = NULL;
PFILE_NAMES_INFORMATION NamesInformation = NULL;
PEXT2_DIR_ENTRY PtrDirEntry = NULL; PEXT2_DIR_ENTRY PtrDirEntry = NULL;
@ -233,7 +229,7 @@ PtrExt2CCB PtrCCB)
PBCB PtrBCB = NULL; PBCB PtrBCB = NULL;
BYTE * PtrPinnedBlockBuffer = NULL; BYTE * PtrPinnedBlockBuffer = NULL;
unsigned int i,j; unsigned int j;
DebugTrace(DEBUG_TRACE_MISC, " === Querying Directory %S", PtrFCB->FCBName->ObjectName.Buffer ); DebugTrace(DEBUG_TRACE_MISC, " === Querying Directory %S", PtrFCB->FCBName->ObjectName.Buffer );

View file

@ -49,7 +49,6 @@ PUNICODE_STRING RegistryPath) // path to the registry key
{ {
NTSTATUS RC = STATUS_SUCCESS; NTSTATUS RC = STATUS_SUCCESS;
UNICODE_STRING DriverDeviceName; UNICODE_STRING DriverDeviceName;
BOOLEAN RegisteredShutdown = FALSE;
#if 0 #if 0
Ext2BreakPoint(); Ext2BreakPoint();
@ -128,7 +127,7 @@ PUNICODE_STRING RegistryPath) // path to the registry key
// create a device object representing the driver itself // create a device object representing the driver itself
// so that requests can be targeted to the driver ... // so that requests can be targeted to the driver ...
// e.g. for a disk-based FSD, "mount" requests will be sent to // e.g. for a disk-based FSD, "mount" requests will be sent to
// this device object by the I/O Manager.\ // this device object by the I/O Manager.
// For a redirector/server, you may have applications // For a redirector/server, you may have applications
// send "special" IOCTL's using this device object ... // send "special" IOCTL's using this device object ...
RtlInitUnicodeString(&DriverDeviceName, EXT2_FS_NAME); RtlInitUnicodeString(&DriverDeviceName, EXT2_FS_NAME);
@ -136,10 +135,10 @@ PUNICODE_STRING RegistryPath) // path to the registry key
DriverObject, // our driver object DriverObject, // our driver object
0, // don't need an extension for this object 0, // don't need an extension for this object
&DriverDeviceName,// name - can be used to "open" the driver &DriverDeviceName,// name - can be used to "open" the driver
// see the book for alternate choices // see the book for alternate choices
FILE_DEVICE_DISK_FILE_SYSTEM, FILE_DEVICE_DISK_FILE_SYSTEM,
0, // no special characteristics 0, // no special characteristics
// do not want this as an exclusive device, though you might // do not want this as an exclusive device, though you might
FALSE, FALSE,
&(Ext2GlobalData.Ext2DeviceObject)))) &(Ext2GlobalData.Ext2DeviceObject))))
{ {

View file

@ -191,9 +191,6 @@ IN PDEVICE_OBJECT DeviceObject)
Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC); Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC);
} }
try_exit: NOTHING;
} finally { } finally {
} }
@ -257,9 +254,6 @@ IN PDEVICE_OBJECT DeviceObject)
Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC); Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC);
} }
try_exit: NOTHING;
} }
finally finally
{ {
@ -321,9 +315,6 @@ IN PDEVICE_OBJECT DeviceObject)
RC = Ext2ExceptionHandler(PtrIrpContext, NULL); RC = Ext2ExceptionHandler(PtrIrpContext, NULL);
Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC); Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC);
} }
try_exit: NOTHING;
} }
finally finally
{ {
@ -384,9 +375,6 @@ IN PDEVICE_OBJECT DeviceObject)
RC = Ext2ExceptionHandler(PtrIrpContext, NULL); RC = Ext2ExceptionHandler(PtrIrpContext, NULL);
Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC); Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC);
} }
try_exit: NOTHING;
} }
finally finally
{ {
@ -452,9 +440,6 @@ IN PDEVICE_OBJECT DeviceObject)
RC = Ext2ExceptionHandler(PtrIrpContext, NULL); RC = Ext2ExceptionHandler(PtrIrpContext, NULL);
Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC); Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC);
} }
try_exit: NOTHING;
} }
finally finally
{ {
@ -519,9 +504,6 @@ IN PDEVICE_OBJECT DeviceObject)
RC = Ext2ExceptionHandler(PtrIrpContext, NULL); RC = Ext2ExceptionHandler(PtrIrpContext, NULL);
Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC); Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC);
} }
try_exit: NOTHING;
} }
finally finally
{ {
@ -582,9 +564,6 @@ IN PDEVICE_OBJECT DeviceObject)
RC = Ext2ExceptionHandler(PtrIrpContext, NULL); RC = Ext2ExceptionHandler(PtrIrpContext, NULL);
Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC); Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC);
} }
try_exit: NOTHING;
} }
finally finally
{ {
@ -646,9 +625,6 @@ IN PDEVICE_OBJECT DeviceObject)
RC = Ext2ExceptionHandler(PtrIrpContext, NULL); RC = Ext2ExceptionHandler(PtrIrpContext, NULL);
Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC); Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC);
} }
try_exit: NOTHING;
} }
finally finally
{ {
@ -931,8 +907,6 @@ void NTAPI Ext2RelLazyWrite(
IN PVOID Context) IN PVOID Context)
{ {
BOOLEAN ReturnedStatus = TRUE;
PtrExt2VCB PtrVCB = NULL; PtrExt2VCB PtrVCB = NULL;
PtrExt2FCB PtrFCB = NULL; PtrExt2FCB PtrFCB = NULL;
PtrExt2CCB PtrCCB = NULL; PtrExt2CCB PtrCCB = NULL;
@ -1105,7 +1079,6 @@ IN BOOLEAN Wait)
void NTAPI Ext2RelReadAhead( void NTAPI Ext2RelReadAhead(
IN PVOID Context) IN PVOID Context)
{ {
BOOLEAN ReturnedStatus = TRUE;
PtrExt2FCB PtrFCB = NULL; PtrExt2FCB PtrFCB = NULL;
PtrExt2CCB PtrCCB = NULL; PtrExt2CCB PtrCCB = NULL;
PtrExt2NTRequiredFCB PtrReqdFCB = NULL; PtrExt2NTRequiredFCB PtrReqdFCB = NULL;
@ -1211,9 +1184,6 @@ IN PDEVICE_OBJECT DeviceObject)
RC = Ext2ExceptionHandler(PtrIrpContext, NULL); RC = Ext2ExceptionHandler(PtrIrpContext, NULL);
Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC); Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC);
} }
try_exit: NOTHING;
} }
finally finally
{ {
@ -1278,9 +1248,6 @@ IN PDEVICE_OBJECT DeviceObject)
RC = Ext2ExceptionHandler(PtrIrpContext, NULL); RC = Ext2ExceptionHandler(PtrIrpContext, NULL);
Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC); Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC);
} }
try_exit: NOTHING;
} }
finally finally
{ {
@ -1345,9 +1312,6 @@ IN PDEVICE_OBJECT DeviceObject)
Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC); Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC);
} }
try_exit: NOTHING;
} }
finally finally
{ {
@ -1411,9 +1375,6 @@ IN PDEVICE_OBJECT DeviceObject)
Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC); Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC);
} }
try_exit: NOTHING;
} }
finally finally
{ {
@ -1476,9 +1437,6 @@ IN PDEVICE_OBJECT DeviceObject)
RC = Ext2ExceptionHandler(PtrIrpContext, NULL); RC = Ext2ExceptionHandler(PtrIrpContext, NULL);
Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC); Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC);
} }
try_exit: NOTHING;
} }
finally finally
{ {
@ -1556,9 +1514,6 @@ IN PDEVICE_OBJECT DeviceObject)
RC = Ext2ExceptionHandler(PtrIrpContext, NULL); RC = Ext2ExceptionHandler(PtrIrpContext, NULL);
Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC); Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC);
} }
try_exit: NOTHING;
} }
finally finally
{ {
@ -1621,9 +1576,6 @@ IN PDEVICE_OBJECT DeviceObject)
RC = Ext2ExceptionHandler(PtrIrpContext, NULL); RC = Ext2ExceptionHandler(PtrIrpContext, NULL);
Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC); Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC);
} }
try_exit: NOTHING;
} }
finally finally
{ {
@ -1681,9 +1633,6 @@ IN PDEVICE_OBJECT DeviceObject)
RC = Ext2ExceptionHandler(PtrIrpContext, NULL); RC = Ext2ExceptionHandler(PtrIrpContext, NULL);
Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC); Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC);
} }
try_exit: NOTHING;
} }
finally finally
{ {
@ -1740,9 +1689,6 @@ IN PDEVICE_OBJECT DeviceObject)
RC = Ext2ExceptionHandler(PtrIrpContext, NULL); RC = Ext2ExceptionHandler(PtrIrpContext, NULL);
Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC); Ext2LogEvent(EXT2_ERROR_INTERNAL_ERROR, RC);
} }
try_exit: NOTHING;
} }
finally finally
{ {

View file

@ -115,7 +115,6 @@ PIRP PtrIrp)
BOOLEAN MainResourceAcquired = FALSE; BOOLEAN MainResourceAcquired = FALSE;
BOOLEAN VCBResourceAcquired = FALSE; BOOLEAN VCBResourceAcquired = FALSE;
BOOLEAN PagingIoResourceAcquired = FALSE; BOOLEAN PagingIoResourceAcquired = FALSE;
IO_STATUS_BLOCK LocalIoStatus;
void *PtrSystemBuffer = NULL; void *PtrSystemBuffer = NULL;
long BufferLength = 0; long BufferLength = 0;
FILE_INFORMATION_CLASS FunctionalityRequested; FILE_INFORMATION_CLASS FunctionalityRequested;
@ -894,8 +893,6 @@ NTSTATUS NTAPI Ext2SetBasicInformation(
{ {
Ext2ClearFlag(PtrFileObject->Flags, FO_TEMPORARY_FILE); Ext2ClearFlag(PtrFileObject->Flags, FO_TEMPORARY_FILE);
} }
try_exit: NOTHING;
} }
finally finally
{ {

View file

@ -282,8 +282,6 @@ PIRP PtrIrp,
PtrExt2VCB PtrVCB) PtrExt2VCB PtrVCB)
{ {
BOOLEAN AcquiredVCB = FALSE; BOOLEAN AcquiredVCB = FALSE;
PtrExt2FCB PtrFCB = NULL;
PLIST_ENTRY PtrNextFCB = NULL;
try { try {
ExAcquireResourceExclusiveLite(&(PtrVCB->VCBResource), TRUE); ExAcquireResourceExclusiveLite(&(PtrVCB->VCBResource), TRUE);
@ -335,8 +333,6 @@ PDEVICE_OBJECT PtrDeviceObject,
PIRP PtrIrp, PIRP PtrIrp,
PVOID Context) PVOID Context)
{ {
NTSTATUS RC = STATUS_SUCCESS;
if (PtrIrp->PendingReturned) { if (PtrIrp->PendingReturned) {
IoMarkIrpPending(PtrIrp); IoMarkIrpPending(PtrIrp);
} }

View file

@ -895,8 +895,6 @@ NTSTATUS Ext2UserFileSystemRequest (
DebugTrace(DEBUG_TRACE_FSCTRL, "Unknown FSCTRL !!!", 0); DebugTrace(DEBUG_TRACE_FSCTRL, "Unknown FSCTRL !!!", 0);
} }
try_exit: NOTHING;
} }
finally finally
{ {

View file

@ -242,15 +242,7 @@ NTSTATUS NTAPI Ext2PassDownSingleReadWriteIRP(
PEXT2_IO_CONTEXT PtrIoContext = NULL; PEXT2_IO_CONTEXT PtrIoContext = NULL;
PKEVENT PtrSyncEvent = NULL; PKEVENT PtrSyncEvent = NULL;
PVOID PtrReadBuffer = NULL;
ULONG ReadBufferLength = 0;
ULONG LogicalBlockNo = 0;
ULONG LogicalBlockSize = 0;
ULONG PhysicalBlockSize = 0;
uint32 NumberBytesRead = 0;
int i;
PIO_STACK_LOCATION PtrIrpNextSp = NULL; PIO_STACK_LOCATION PtrIrpNextSp = NULL;
try try

View file

@ -472,8 +472,6 @@ ULONG NTAPI Ext2AllocInode(
} }
} }
try_exit: NOTHING;
} }
finally finally
{ {
@ -714,8 +712,6 @@ NTSTATUS NTAPI Ext2WriteInode(
// The Read Buffer Pointer // The Read Buffer Pointer
BYTE * PtrPinnedBuffer = NULL; BYTE * PtrPinnedBuffer = NULL;
PEXT2_INODE PtrTempInode;
// Buffer Control Block // Buffer Control Block
PBCB PtrBCB = NULL; PBCB PtrBCB = NULL;
@ -841,7 +837,6 @@ BOOLEAN NTAPI Ext2MakeNewDirectoryEntry(
PtrExt2VCB PtrVCB; PtrExt2VCB PtrVCB;
LARGE_INTEGER VolumeByteOffset; LARGE_INTEGER VolumeByteOffset;
unsigned long LogicalBlockSize = 0; unsigned long LogicalBlockSize = 0;
unsigned long NumberOfBytesToRead = 0;
BOOLEAN RC = FALSE; BOOLEAN RC = FALSE;
USHORT HeaderLength = sizeof( EXT2_DIR_ENTRY ); USHORT HeaderLength = sizeof( EXT2_DIR_ENTRY );
@ -1071,7 +1066,6 @@ BOOLEAN NTAPI Ext2FreeDirectoryEntry(
PBCB PtrDataBlockBCB = NULL; PBCB PtrDataBlockBCB = NULL;
BYTE * PtrDataBlock = NULL; BYTE * PtrDataBlock = NULL;
PFILE_OBJECT PtrFileObject = NULL; PFILE_OBJECT PtrFileObject = NULL;
PEXT2_DIR_ENTRY PtrTempDirEntry;
LONGLONG ByteOffset = 0; LONGLONG ByteOffset = 0;
PtrExt2VCB PtrVCB; PtrExt2VCB PtrVCB;
LARGE_INTEGER VolumeByteOffset; LARGE_INTEGER VolumeByteOffset;
@ -2598,9 +2592,6 @@ BOOLEAN NTAPI Ext2IsDirectoryEmpty(
BYTE * PtrPinnedBlockBuffer = NULL; BYTE * PtrPinnedBlockBuffer = NULL;
PEXT2_DIR_ENTRY PtrDirEntry = NULL; PEXT2_DIR_ENTRY PtrDirEntry = NULL;
BOOLEAN Found = FALSE; BOOLEAN Found = FALSE;
int i;
StartBufferOffset.QuadPart = 0; StartBufferOffset.QuadPart = 0;

View file

@ -205,9 +205,6 @@ void)
DebugTrace( DEBUG_TRACE_FREE, "Freeing = %lX [misc]", Ext2GlobalData.IrpContextZone); DebugTrace( DEBUG_TRACE_FREE, "Freeing = %lX [misc]", Ext2GlobalData.IrpContextZone);
ExFreePool(Ext2GlobalData.IrpContextZone); ExFreePool(Ext2GlobalData.IrpContextZone);
try_exit: NOTHING;
} }
finally finally
{ {
@ -429,7 +426,7 @@ void)
{ {
PtrExt2ObjectName PtrObjectName = NULL; PtrExt2ObjectName PtrObjectName = NULL;
BOOLEAN AllocatedFromZone = TRUE; BOOLEAN AllocatedFromZone = TRUE;
KIRQL CurrentIrql; //KIRQL CurrentIrql;
/* /*
// first, try to allocate out of the zone // first, try to allocate out of the zone
KeAcquireSpinLock(&(Ext2GlobalData.ZoneAllocationSpinLock), &CurrentIrql); KeAcquireSpinLock(&(Ext2GlobalData.ZoneAllocationSpinLock), &CurrentIrql);
@ -491,7 +488,9 @@ void)
void NTAPI Ext2ReleaseObjectName( void NTAPI Ext2ReleaseObjectName(
PtrExt2ObjectName PtrObjectName) PtrExt2ObjectName PtrObjectName)
{ {
#ifdef USE_ZONES
KIRQL CurrentIrql; KIRQL CurrentIrql;
#endif
ASSERT(PtrObjectName); ASSERT(PtrObjectName);
PtrObjectName->NodeIdentifier.NodeType = EXT2_NODE_TYPE_FREED; PtrObjectName->NodeIdentifier.NodeType = EXT2_NODE_TYPE_FREED;
@ -540,7 +539,9 @@ void)
{ {
PtrExt2CCB PtrCCB = NULL; PtrExt2CCB PtrCCB = NULL;
BOOLEAN AllocatedFromZone = TRUE; BOOLEAN AllocatedFromZone = TRUE;
KIRQL CurrentIrql; #ifdef USE_ZONES
KIRQL CurrentIrql;
#endif
#ifdef USE_ZONES #ifdef USE_ZONES
@ -608,7 +609,9 @@ void)
void NTAPI Ext2ReleaseCCB( void NTAPI Ext2ReleaseCCB(
PtrExt2CCB PtrCCB) PtrExt2CCB PtrCCB)
{ {
#ifdef USE_ZONES
KIRQL CurrentIrql; KIRQL CurrentIrql;
#endif
ASSERT( PtrCCB ); ASSERT( PtrCCB );
if(PtrCCB->NodeIdentifier.NodeType != EXT2_NODE_TYPE_CCB) if(PtrCCB->NodeIdentifier.NodeType != EXT2_NODE_TYPE_CCB)
@ -665,7 +668,9 @@ void)
{ {
PtrExt2FCB PtrFCB = NULL; PtrExt2FCB PtrFCB = NULL;
BOOLEAN AllocatedFromZone = TRUE; BOOLEAN AllocatedFromZone = TRUE;
#ifdef USE_ZONES
KIRQL CurrentIrql; KIRQL CurrentIrql;
#endif
// first, try to allocate out of the zone // first, try to allocate out of the zone
#ifdef USE_ZONES #ifdef USE_ZONES
@ -862,7 +867,7 @@ PtrExt2ObjectName PtrObjectName)
void NTAPI Ext2ReleaseFCB( void NTAPI Ext2ReleaseFCB(
PtrExt2FCB PtrFCB) PtrExt2FCB PtrFCB)
{ {
KIRQL CurrentIrql; //KIRQL CurrentIrql;
AssertFCB( PtrFCB ); AssertFCB( PtrFCB );
@ -1025,7 +1030,7 @@ PDEVICE_OBJECT PtrTargetDeviceObject)
{ {
PtrExt2IrpContext PtrIrpContext = NULL; PtrExt2IrpContext PtrIrpContext = NULL;
BOOLEAN AllocatedFromZone = TRUE; BOOLEAN AllocatedFromZone = TRUE;
KIRQL CurrentIrql; //KIRQL CurrentIrql;
PIO_STACK_LOCATION PtrIoStackLocation = NULL; PIO_STACK_LOCATION PtrIoStackLocation = NULL;
/* /*
@ -1611,8 +1616,6 @@ NTSTATUS NTAPI Ext2GetFCB_CCB_VCB_FromFileObject (
OUT PtrExt2CCB *PPtrCCB, OUT PtrExt2CCB *PPtrCCB,
OUT PtrExt2VCB *PPtrVCB ) OUT PtrExt2VCB *PPtrVCB )
{ {
int Offset;
(*PPtrCCB) = (PtrExt2CCB)(PtrFileObject->FsContext2); (*PPtrCCB) = (PtrExt2CCB)(PtrFileObject->FsContext2);
if( *PPtrCCB ) if( *PPtrCCB )
{ {

View file

@ -117,10 +117,8 @@ BOOLEAN FirstAttempt )
PtrExt2VCB PtrVCB = NULL; PtrExt2VCB PtrVCB = NULL;
PtrExt2NTRequiredFCB PtrReqdFCB = NULL; PtrExt2NTRequiredFCB PtrReqdFCB = NULL;
PERESOURCE PtrResourceAcquired = NULL; PERESOURCE PtrResourceAcquired = NULL;
IO_STATUS_BLOCK LocalIoStatus;
PVOID PtrSystemBuffer = NULL; PVOID PtrSystemBuffer = NULL;
PVOID PtrPinnedReadBuffer = NULL; PVOID PtrPinnedReadBuffer = NULL;
uint32 KeyValue = 0;
BOOLEAN CompleteIrp = TRUE; BOOLEAN CompleteIrp = TRUE;
BOOLEAN PostRequest = FALSE; BOOLEAN PostRequest = FALSE;
@ -129,14 +127,8 @@ BOOLEAN FirstAttempt )
BOOLEAN PagingIo = FALSE; BOOLEAN PagingIo = FALSE;
BOOLEAN NonBufferedIo = FALSE; BOOLEAN NonBufferedIo = FALSE;
BOOLEAN SynchronousIo = FALSE; BOOLEAN SynchronousIo = FALSE;
BOOLEAN MdlLocked = FALSE;
BOOLEAN ReadTruncated = FALSE; BOOLEAN ReadTruncated = FALSE;
LARGE_INTEGER StartPhysicalBlock;
ULONG NoOfBlocks = 0;
PIO_STACK_LOCATION PtrIrpNextSp = NULL;
// Used to cache the Single Indirect blocks pointed to by // Used to cache the Single Indirect blocks pointed to by
// the Double Indirect block // the Double Indirect block
PEXT2_SIBLOCKS PtrDIArray = NULL; PEXT2_SIBLOCKS PtrDIArray = NULL;
@ -162,7 +154,7 @@ BOOLEAN FirstAttempt )
PBCB PtrPinnedDIndirectBCB = NULL; PBCB PtrPinnedDIndirectBCB = NULL;
PBCB PtrPinnedTIndirectBCB = NULL; PBCB PtrPinnedTIndirectBCB = NULL;
int i, Index; int Index;
try try
{ {

View file

@ -108,7 +108,6 @@ PIRP PtrIrp)
{ {
NTSTATUS RC = STATUS_SUCCESS; NTSTATUS RC = STATUS_SUCCESS;
PIO_STACK_LOCATION PtrIoStackLocation = NULL; PIO_STACK_LOCATION PtrIoStackLocation = NULL;
IO_STATUS_BLOCK LocalIoStatus;
try try
{ {
@ -197,8 +196,6 @@ PIRP PtrIrp)
} }
*///////////////////////////////////////////// */////////////////////////////////////////////
try_exit: NOTHING;
} }
finally finally
{ {

View file

@ -174,7 +174,6 @@ NTSTATUS NTAPI Ext2QueryVolInfo (
Status = STATUS_BUFFER_OVERFLOW; Status = STATUS_BUFFER_OVERFLOW;
DebugTrace(DEBUG_TRACE_MISC, " === Buffer insufficient", 0); DebugTrace(DEBUG_TRACE_MISC, " === Buffer insufficient", 0);
} }
try_exit: NOTHING;
} }
finally finally
{ {

View file

@ -113,9 +113,7 @@ NTSTATUS NTAPI Ext2CommonWrite(
PtrExt2VCB PtrVCB = NULL; PtrExt2VCB PtrVCB = NULL;
PtrExt2NTRequiredFCB PtrReqdFCB = NULL; PtrExt2NTRequiredFCB PtrReqdFCB = NULL;
PERESOURCE PtrResourceAcquired = NULL; PERESOURCE PtrResourceAcquired = NULL;
IO_STATUS_BLOCK LocalIoStatus;
void *PtrSystemBuffer = NULL; void *PtrSystemBuffer = NULL;
uint32 KeyValue = 0;
BOOLEAN CompleteIrp = TRUE; BOOLEAN CompleteIrp = TRUE;
BOOLEAN PostRequest = FALSE; BOOLEAN PostRequest = FALSE;