diff --git a/reactos/drivers/dd/serial/devctrl.c b/reactos/drivers/dd/serial/devctrl.c index 431118b7a27..ad88cd198db 100644 --- a/reactos/drivers/dd/serial/devctrl.c +++ b/reactos/drivers/dd/serial/devctrl.c @@ -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 diff --git a/reactos/drivers/dd/serial/misc.c b/reactos/drivers/dd/serial/misc.c index 9616286b30c..701088e1a45 100644 --- a/reactos/drivers/dd/serial/misc.c +++ b/reactos/drivers/dd/serial/misc.c @@ -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; } diff --git a/reactos/drivers/fs/vfat/fsctl.c b/reactos/drivers/fs/vfat/fsctl.c index 66ab7b914f8..a2a49752b1c 100644 --- a/reactos/drivers/fs/vfat/fsctl.c +++ b/reactos/drivers/fs/vfat/fsctl.c @@ -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; diff --git a/reactos/drivers/input/i8042prt/keyboard.c b/reactos/drivers/input/i8042prt/keyboard.c index c2f8f30c825..abee94475e4 100644 --- a/reactos/drivers/input/i8042prt/keyboard.c +++ b/reactos/drivers/input/i8042prt/keyboard.c @@ -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) diff --git a/reactos/drivers/net/ndis/ndis/config.c b/reactos/drivers/net/ndis/ndis/config.c index 483727b6a25..7c2a28d2e6b 100644 --- a/reactos/drivers/net/ndis/ndis/config.c +++ b/reactos/drivers/net/ndis/ndis/config.c @@ -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,