fixed more uninitialized variables warnings
Modified: trunk/reactos/drivers/dd/serial/devctrl.c
Modified: trunk/reactos/drivers/dd/serial/misc.c
Modified: trunk/reactos/drivers/fs/vfat/fsctl.c
Modified: trunk/reactos/drivers/input/i8042prt/keyboard.c
Modified: trunk/reactos/drivers/net/ndis/ndis/config.c

Modified: trunk/reactos/drivers/dd/serial/devctrl.c
--- trunk/reactos/drivers/dd/serial/devctrl.c	2005-05-08 18:58:22 UTC (rev 15146)
+++ trunk/reactos/drivers/dd/serial/devctrl.c	2005-05-08 19:10:23 UTC (rev 15147)
@@ -28,19 +28,22 @@
 	{
 		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

Modified: trunk/reactos/drivers/dd/serial/misc.c
--- trunk/reactos/drivers/dd/serial/misc.c	2005-05-08 18:58:22 UTC (rev 15146)
+++ trunk/reactos/drivers/dd/serial/misc.c	2005-05-08 19:10:23 UTC (rev 15147)
@@ -206,13 +206,13 @@
 
 			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;
 		}

Modified: trunk/reactos/drivers/fs/vfat/fsctl.c
--- trunk/reactos/drivers/fs/vfat/fsctl.c	2005-05-08 18:58:22 UTC (rev 15146)
+++ trunk/reactos/drivers/fs/vfat/fsctl.c	2005-05-08 19:10:23 UTC (rev 15147)
@@ -222,6 +222,7 @@
             {
                DPRINT("FAT12\n");
                FatInfo.FatType = FAT12;
+               FatInfo.RootCluster = (FatInfo.rootStart - 1) / FatInfo.SectorsPerCluster;
             }
             else if (FatInfo.NumberOfClusters >= 65525)
             {
@@ -235,6 +236,7 @@
             {
                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 @@
                   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;
 

Modified: trunk/reactos/drivers/input/i8042prt/keyboard.c
--- trunk/reactos/drivers/input/i8042prt/keyboard.c	2005-05-08 18:58:22 UTC (rev 15146)
+++ trunk/reactos/drivers/input/i8042prt/keyboard.c	2005-05-08 19:10:23 UTC (rev 15147)
@@ -726,7 +726,7 @@
 	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)

Modified: trunk/reactos/drivers/net/ndis/ndis/config.c
--- trunk/reactos/drivers/net/ndis/ndis/config.c	2005-05-08 18:58:22 UTC (rev 15146)
+++ trunk/reactos/drivers/net/ndis/ndis/config.c	2005-05-08 19:10:23 UTC (rev 15147)
@@ -103,6 +103,10 @@
             Data = ParameterValue->ParameterData.BinaryData.Buffer;
             DataSize = ParameterValue->ParameterData.BinaryData.Length;
             break;
+
+        default:
+            *Status = NDIS_STATUS_FAILURE;
+            return;
     }
 
     *Status = ZwSetValueKey(((PMINIPORT_CONFIGURATION_CONTEXT)ConfigurationHandle)->Handle,