fixed more uninitialized variables warnings

svn path=/trunk/; revision=15147
This commit is contained in:
Thomas Bluemel 2005-05-08 19:10:23 +00:00
parent 87bab86c6b
commit 51d7b8f785
5 changed files with 20 additions and 10 deletions

View file

@ -28,19 +28,22 @@ SerialGetUserBuffers(
{
case METHOD_BUFFERED:
*BufferIn = *BufferOut = Irp->AssociatedIrp.SystemBuffer;
return;
break;
case METHOD_IN_DIRECT:
case METHOD_OUT_DIRECT:
*BufferIn = Irp->AssociatedIrp.SystemBuffer;
*BufferOut = MmGetSystemAddressForMdl(Irp->MdlAddress);
return;
break;
case METHOD_NEITHER:
*BufferIn = IoGetCurrentIrpStackLocation(Irp)->Parameters.DeviceIoControl.Type3InputBuffer;
*BufferOut = Irp->UserBuffer;
return;
break;
default:
/* Should never happen */
*BufferIn = NULL;
*BufferOut = NULL;
break;
}
/* Should never happen */
}
NTSTATUS STDCALL

View file

@ -206,13 +206,13 @@ SerialInterruptService(
LSR = READ_PORT_UCHAR(SER_LSR(ComPortBase));
if (LSR & SR_LSR_OVERRUN_ERROR)
InterlockedIncrement(&DeviceExtension->SerialPerfStats.SerialOverrunErrorCount);
InterlockedIncrement((PLONG)&DeviceExtension->SerialPerfStats.SerialOverrunErrorCount);
if (LSR & SR_LSR_PARITY_ERROR)
InterlockedIncrement(&DeviceExtension->SerialPerfStats.ParityErrorCount);
InterlockedIncrement((PLONG)&DeviceExtension->SerialPerfStats.ParityErrorCount);
if (LSR & SR_LSR_FRAMING_ERROR)
InterlockedIncrement(&DeviceExtension->SerialPerfStats.FrameErrorCount);
InterlockedIncrement((PLONG)&DeviceExtension->SerialPerfStats.FrameErrorCount);
if (LSR & SR_LSR_BREAK_INT)
InterlockedIncrement(&DeviceExtension->BreakInterruptErrorCount);
InterlockedIncrement((PLONG)&DeviceExtension->BreakInterruptErrorCount);
return TRUE;
}

View file

@ -222,6 +222,7 @@ VfatHasFileSystem(PDEVICE_OBJECT DeviceToMount,
{
DPRINT("FAT12\n");
FatInfo.FatType = FAT12;
FatInfo.RootCluster = (FatInfo.rootStart - 1) / FatInfo.SectorsPerCluster;
}
else if (FatInfo.NumberOfClusters >= 65525)
{
@ -235,6 +236,7 @@ VfatHasFileSystem(PDEVICE_OBJECT DeviceToMount,
{
DPRINT("FAT16\n");
FatInfo.FatType = FAT16;
FatInfo.RootCluster = FatInfo.rootStart / FatInfo.SectorsPerCluster;
}
if (PartitionInfoIsValid &&
FatInfo.Sectors > PartitionInfo.PartitionLength.QuadPart / FatInfo.BytesPerSector)
@ -316,6 +318,7 @@ VfatHasFileSystem(PDEVICE_OBJECT DeviceToMount,
ROUND_UP(FatInfo.Sectors / FatInfo.SectorsPerCluster * (FatInfo.FatType == FATX16 ? 2 : 4), 4096) /
FatInfo.BytesPerSector;
FatInfo.rootStart = FatInfo.FATStart + FatInfo.FATCount * FatInfo.FATSectors;
FatInfo.RootCluster = (FatInfo.rootStart - 1) / FatInfo.SectorsPerCluster;
FatInfo.dataStart = FatInfo.rootStart + FatInfo.rootDirectorySectors;
FatInfo.NumberOfClusters = (FatInfo.Sectors - FatInfo.dataStart) / FatInfo.SectorsPerCluster;

View file

@ -726,7 +726,7 @@ static VOID STDCALL I8042DebugWorkItem(PDEVICE_OBJECT DeviceObject,
PFDO_DEVICE_EXTENSION FdoDevExt = DeviceObject->DeviceExtension;
PDEVICE_EXTENSION DevExt = FdoDevExt->PortDevExt;
Key = InterlockedExchange(&DevExt->DebugKey, 0);
Key = InterlockedExchange((PLONG)&DevExt->DebugKey, 0);
DPRINT("Debug key: %x\n", Key);
if (!Key)

View file

@ -103,6 +103,10 @@ NdisWriteConfiguration(
Data = ParameterValue->ParameterData.BinaryData.Buffer;
DataSize = ParameterValue->ParameterData.BinaryData.Length;
break;
default:
*Status = NDIS_STATUS_FAILURE;
return;
}
*Status = ZwSetValueKey(((PMINIPORT_CONFIGURATION_CONTEXT)ConfigurationHandle)->Handle,