fixed warnings when compiled with -Wmissing-declarations
Modified: trunk/reactos/drivers/bus/acpi/dispatcher/dsutils.c
Modified: trunk/reactos/drivers/bus/acpi/executer/ammutex.c
Modified: trunk/reactos/drivers/bus/acpi/executer/amresop.c
Modified: trunk/reactos/drivers/bus/isapnp/isapnp.c
Modified: trunk/reactos/drivers/bus/isapnp/isapnp.h
Modified: trunk/reactos/drivers/bus/pci/pci.c
Modified: trunk/reactos/drivers/bus/pci/pci.h
Modified: trunk/reactos/drivers/bus/pci/pdo.c
Modified: trunk/reactos/drivers/bus/serenum/detect.c
Modified: trunk/reactos/drivers/bus/serenum/fdo.c
Modified: trunk/reactos/drivers/bus/serenum/misc.c
Modified: trunk/reactos/drivers/bus/serenum/pdo.c
Modified: trunk/reactos/drivers/bus/serenum/serenum.c
Modified: trunk/reactos/drivers/bus/serenum/serenum.h
Modified: trunk/reactos/drivers/dd/beep/beep.c
Modified: trunk/reactos/drivers/dd/blue/blue.c
Modified: trunk/reactos/drivers/dd/bootvid/bootvid.c
Modified: trunk/reactos/drivers/dd/bootvid/bootvid.h
Modified: trunk/reactos/drivers/dd/debugout/debugout.c
Modified: trunk/reactos/drivers/dd/mpu401/mpu401.c
Modified: trunk/reactos/drivers/dd/mpu401/mpu401.h
Modified: trunk/reactos/drivers/dd/mpu401/settings.c
Modified: trunk/reactos/drivers/dd/null/null.c
Modified: trunk/reactos/drivers/dd/null/null.h
Modified: trunk/reactos/drivers/dd/parallel/parallel.c
Modified: trunk/reactos/drivers/dd/ramdrv/ramdrv.c
Modified: trunk/reactos/drivers/dd/ramdrv/ramdrv.h
Modified: trunk/reactos/drivers/dd/serial/devctrl.c
Modified: trunk/reactos/drivers/dd/serial/misc.c
Modified: trunk/reactos/drivers/dd/serial/serial.c
Modified: trunk/reactos/drivers/dd/serial/serial.h
Modified: trunk/reactos/drivers/dd/sndblst/dma.c
Modified: trunk/reactos/drivers/dd/sndblst/irq.c
Modified: trunk/reactos/drivers/dd/sndblst/settings.c
Modified: trunk/reactos/drivers/dd/sndblst/sndblst.c
Modified: trunk/reactos/drivers/dd/sound/sb16.c
Modified: trunk/reactos/drivers/dd/sound/sb_waveout.c
Modified: trunk/reactos/drivers/dd/sound/sound.c
Modified: trunk/reactos/drivers/dd/sound/wave.c
Modified: trunk/reactos/drivers/fs/cdfs/cdfs.h
Modified: trunk/reactos/drivers/fs/fs_rec/fs_rec.c
Modified: trunk/reactos/drivers/fs/fs_rec/fs_rec.h
Modified: trunk/reactos/drivers/fs/ms/msfs.h
Modified: trunk/reactos/drivers/fs/mup/mup.h
Modified: trunk/reactos/drivers/fs/np/npfs.h
Modified: trunk/reactos/drivers/fs/ntfs/attrib.c
Modified: trunk/reactos/drivers/fs/ntfs/fcb.c
Modified: trunk/reactos/drivers/fs/ntfs/mft.c
Modified: trunk/reactos/drivers/fs/ntfs/ntfs.h
Modified: trunk/reactos/drivers/fs/vfat/create.c
Modified: trunk/reactos/drivers/fs/vfat/dir.c
Modified: trunk/reactos/drivers/fs/vfat/direntry.c
Modified: trunk/reactos/drivers/fs/vfat/dirwr.c
Modified: trunk/reactos/drivers/fs/vfat/fastio.c
Modified: trunk/reactos/drivers/fs/vfat/fat.c
Modified: trunk/reactos/drivers/fs/vfat/fcb.c
Modified: trunk/reactos/drivers/fs/vfat/finfo.c
Modified: trunk/reactos/drivers/fs/vfat/flush.c
Modified: trunk/reactos/drivers/fs/vfat/misc.c
Modified: trunk/reactos/drivers/fs/vfat/rw.c
Modified: trunk/reactos/drivers/fs/vfat/shutdown.c
Modified: trunk/reactos/drivers/input/i8042prt/i8042prt.c
Modified: trunk/reactos/drivers/input/i8042prt/i8042prt.h
Modified: trunk/reactos/drivers/input/i8042prt/keyboard.c
Modified: trunk/reactos/drivers/input/i8042prt/mouse.c
Modified: trunk/reactos/drivers/input/kbdclass/kbdclass.c
Modified: trunk/reactos/drivers/input/mouclass/mouclass.c
Modified: trunk/reactos/drivers/input/sermouse/sermouse.c
Modified: trunk/reactos/drivers/lib/bzip2/dllmain.c
Modified: trunk/reactos/drivers/net/afd/afd/connect.c
Modified: trunk/reactos/drivers/net/afd/afd/listen.c
Modified: trunk/reactos/drivers/net/afd/afd/main.c
Modified: trunk/reactos/drivers/net/afd/afd/read.c
Modified: trunk/reactos/drivers/net/afd/afd/select.c
Modified: trunk/reactos/drivers/net/afd/afd/tdi.c
Modified: trunk/reactos/drivers/net/afd/afd/tdiconn.c
Modified: trunk/reactos/drivers/net/afd/afd/write.c
Modified: trunk/reactos/drivers/net/afd/include/tdi_proto.h
Modified: trunk/reactos/drivers/net/dd/ne2000/ne2000/8390.c
Modified: trunk/reactos/drivers/net/dd/ne2000/ne2000/main.c
Modified: trunk/reactos/drivers/net/dd/pcnet/pcnet.c
Modified: trunk/reactos/lib/pseh/framebased.c
Modified: trunk/reactos/ntoskrnl/ntoskrnl.def
Modified: trunk/reactos/w32api/include/ddk/ntifs.h

Modified: trunk/reactos/drivers/bus/acpi/dispatcher/dsutils.c
--- trunk/reactos/drivers/bus/acpi/dispatcher/dsutils.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/bus/acpi/dispatcher/dsutils.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -239,7 +239,7 @@
 	ACPI_OPERAND_OBJECT     *obj_desc;
 	ACPI_PARSE_OBJECT       *parent_op;
 	u16                     opcode;
-	u32                     flags;
+	u32                     flags = 0;
 	OPERATING_MODE          interpreter_mode;
 
 

Modified: trunk/reactos/drivers/bus/acpi/executer/ammutex.c
--- trunk/reactos/drivers/bus/acpi/executer/ammutex.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/bus/acpi/executer/ammutex.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -74,7 +74,7 @@
  *
  ******************************************************************************/
 
-void
+static void
 acpi_aml_link_mutex (
 	ACPI_OPERAND_OBJECT     *obj_desc,
 	ACPI_OPERAND_OBJECT     *list_head)

Modified: trunk/reactos/drivers/bus/acpi/executer/amresop.c
--- trunk/reactos/drivers/bus/acpi/executer/amresop.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/bus/acpi/executer/amresop.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -53,7 +53,7 @@
  *
  ******************************************************************************/
 
-ACPI_STATUS
+static ACPI_STATUS
 acpi_aml_check_object_type (
 	ACPI_OBJECT_TYPE        type_needed,
 	ACPI_OBJECT_TYPE        this_type,

Modified: trunk/reactos/drivers/bus/isapnp/isapnp.c
--- trunk/reactos/drivers/bus/isapnp/isapnp.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/bus/isapnp/isapnp.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -108,13 +108,14 @@
 	return READ_PORT_UCHAR(IsaPnPReadPort);
 }
 
-UCHAR ReadUchar(UCHAR Index)
+static UCHAR ReadUchar(UCHAR Index)
 {
 	WriteAddress(Index);
 	return ReadData();
 }
 
-USHORT ReadUshort(UCHAR Index)
+#if 0
+static USHORT ReadUshort(UCHAR Index)
 {
 	USHORT Value;
 
@@ -123,7 +124,7 @@
 	return Value;
 }
 
-ULONG ReadUlong(UCHAR Index)
+static ULONG ReadUlong(UCHAR Index)
 {
 	ULONG Value;
 
@@ -133,26 +134,29 @@
 	Value = (Value << 8) + ReadUchar(Index + 3);
 	return Value;
 }
+#endif
 
-VOID WriteUchar(UCHAR Index, UCHAR Value)
+static VOID WriteUchar(UCHAR Index, UCHAR Value)
 {
 	WriteAddress(Index);
 	WriteData(Value);
 }
 
-VOID WriteUshort(UCHAR Index, USHORT Value)
+#if 0
+static VOID WriteUshort(UCHAR Index, USHORT Value)
 {
 	WriteUchar(Index, Value >> 8);
 	WriteUchar(Index + 1, Value);
 }
 
-VOID WriteUlong(UCHAR Index, ULONG Value)
+static VOID WriteUlong(UCHAR Index, ULONG Value)
 {
 	WriteUchar(Index, Value >> 24);
 	WriteUchar(Index + 1, Value >> 16);
 	WriteUchar(Index + 2, Value >> 8);
 	WriteUchar(Index + 3, Value);
 }
+#endif
 
 static inline VOID SetReadDataPort(ULONG Port)
 {
@@ -187,29 +191,31 @@
 	WriteUchar(0x02, 0x02);
 }
 
-VOID SendWake(UCHAR csn)
+static VOID SendWake(UCHAR csn)
 {
 	WriteUchar(ISAPNP_CARD_WAKECSN, csn);
 }
 
-VOID SelectLogicalDevice(UCHAR LogicalDevice)
+#if 0
+static VOID SelectLogicalDevice(UCHAR LogicalDevice)
 {
 	WriteUchar(ISAPNP_CARD_LOG_DEVICE_NUM, LogicalDevice);
 }
 
-VOID ActivateLogicalDevice(UCHAR LogicalDevice)
+static VOID ActivateLogicalDevice(UCHAR LogicalDevice)
 {
 	SelectLogicalDevice(LogicalDevice);
 	WriteUchar(ISAPNP_CONTROL_ACTIVATE, 0x1);
 	KeStallExecutionProcessor(250);
 }
 
-VOID DeactivateLogicalDevice(UCHAR LogicalDevice)
+static VOID DeactivateLogicalDevice(UCHAR LogicalDevice)
 {
 	SelectLogicalDevice(LogicalDevice);
 	WriteUchar(ISAPNP_CONTROL_ACTIVATE, 0x0);
 	KeStallExecutionProcessor(500);
 }
+#endif
 
 #define READ_DATA_PORT_STEP 32  /* Minimum is 4 */
 
@@ -357,7 +363,7 @@
 }
 
 
-VOID Peek(PUCHAR Data, ULONG Count)
+static VOID Peek(PUCHAR Data, ULONG Count)
 {
 	ULONG i, j;
 	UCHAR d = 0;
@@ -1414,7 +1420,7 @@
 }
 
 
-NTSTATUS
+static NTSTATUS
 ISAPNPQueryBusRelations(
   IN PDEVICE_OBJECT DeviceObject,
   IN PIRP Irp,
@@ -1482,7 +1488,7 @@
 }
 
 
-NTSTATUS
+static NTSTATUS
 ISAPNPQueryDeviceRelations(
   IN PDEVICE_OBJECT DeviceObject,
   IN PIRP Irp,
@@ -1511,7 +1517,7 @@
 }
 
 
-NTSTATUS
+static NTSTATUS
 ISAPNPStartDevice(
   IN PDEVICE_OBJECT DeviceObject,
   IN PIRP Irp,
@@ -1550,7 +1556,7 @@
 }
 
 
-NTSTATUS
+static NTSTATUS
 ISAPNPStopDevice(
   IN PDEVICE_OBJECT DeviceObject,
   IN PIRP Irp,
@@ -1571,7 +1577,7 @@
 }
 
 
-NTSTATUS
+static NTSTATUS
 STDCALL
 ISAPNPDispatchOpenClose(
   IN PDEVICE_OBJECT DeviceObject,
@@ -1587,7 +1593,7 @@
 }
 
 
-NTSTATUS
+static NTSTATUS
 STDCALL
 ISAPNPDispatchReadWrite(
   IN PDEVICE_OBJECT PhysicalDeviceObject,
@@ -1603,7 +1609,7 @@
 }
 
 
-NTSTATUS
+static NTSTATUS
 STDCALL
 ISAPNPDispatchDeviceControl(
   IN PDEVICE_OBJECT DeviceObject,
@@ -1635,7 +1641,7 @@
 }
 
 
-NTSTATUS
+static NTSTATUS
 STDCALL
 ISAPNPControl(
   IN PDEVICE_OBJECT DeviceObject,
@@ -1677,7 +1683,7 @@
 }
 
 
-NTSTATUS
+static NTSTATUS
 STDCALL
 ISAPNPAddDevice(
   IN PDRIVER_OBJECT DriverObject,

Modified: trunk/reactos/drivers/bus/isapnp/isapnp.h
--- trunk/reactos/drivers/bus/isapnp/isapnp.h	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/bus/isapnp/isapnp.h	2005-10-06 21:39:18 UTC (rev 18302)
@@ -324,6 +324,12 @@
   ISAPNP_DEVICE_STATE State;
 } ISAPNP_DEVICE_EXTENSION, *PISAPNP_DEVICE_EXTENSION;
 
+NTSTATUS
+STDCALL
+DriverEntry(
+  IN PDRIVER_OBJECT DriverObject,
+  IN PUNICODE_STRING RegistryPath);
+
 #ifdef __cplusplus
 }
 #endif

Modified: trunk/reactos/drivers/bus/pci/pci.c
--- trunk/reactos/drivers/bus/pci/pci.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/bus/pci/pci.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -9,6 +9,7 @@
  */
 
 #include <ddk/ntddk.h>
+#include <ddk/ntifs.h>
 #include <stdio.h>
 
 #include "pcidef.h"
@@ -32,7 +33,7 @@
 
 /*** PRIVATE *****************************************************************/
 
-NTSTATUS
+static NTSTATUS
 STDCALL
 PciDispatchDeviceControl(
   IN PDEVICE_OBJECT DeviceObject,
@@ -67,7 +68,7 @@
 }
 
 
-NTSTATUS
+static NTSTATUS
 STDCALL
 PciPnpControl(
   IN PDEVICE_OBJECT DeviceObject,
@@ -98,7 +99,7 @@
 }
 
 
-NTSTATUS
+static NTSTATUS
 STDCALL
 PciPowerControl(
   IN PDEVICE_OBJECT DeviceObject,
@@ -127,7 +128,7 @@
 }
 
 
-NTSTATUS
+static NTSTATUS
 STDCALL
 PciAddDevice(
   IN PDRIVER_OBJECT DriverObject,
@@ -185,65 +186,6 @@
 
 
 BOOLEAN
-PciCreateUnicodeString(
-  PUNICODE_STRING Destination,
-  PWSTR Source,
-  POOL_TYPE PoolType)
-{
-  ULONG Length;
-
-  if (!Source)
-  {
-    RtlInitUnicodeString(Destination, NULL);
-    return TRUE;
-  }
-
-  Length = (wcslen(Source) + 1) * sizeof(WCHAR);
-
-  Destination->Buffer = ExAllocatePool(PoolType, Length);
-
-  if (Destination->Buffer == NULL)
-  {
-    return FALSE;
-  }
-
-  RtlCopyMemory(Destination->Buffer, Source, Length);
-
-  Destination->MaximumLength = Length;
-
-  Destination->Length = Length - sizeof(WCHAR);
-
-  return TRUE;
-}
-
-
-NTSTATUS
-PciDuplicateUnicodeString(
-  PUNICODE_STRING Destination,
-  PUNICODE_STRING Source,
-  POOL_TYPE PoolType)
-{
-  if (Source == NULL)
-  {
-    RtlInitUnicodeString(Destination, NULL);
-    return STATUS_SUCCESS;
-  }
-
-  Destination->Buffer = ExAllocatePool(PoolType, Source->MaximumLength);
-  if (Destination->Buffer == NULL)
-  {
-    return STATUS_INSUFFICIENT_RESOURCES;
-  }
-
-  Destination->MaximumLength = Source->MaximumLength;
-  Destination->Length = Source->Length;
-  RtlCopyMemory(Destination->Buffer, Source->Buffer, Source->MaximumLength);
-
-  return STATUS_SUCCESS;
-}
-
-
-BOOLEAN
 PciCreateDeviceIDString(PUNICODE_STRING DeviceID,
                         PPCI_DEVICE Device)
 {
@@ -257,7 +199,7 @@
            Device->PciConfig.u.type0.SubVendorID,
            Device->PciConfig.RevisionID);
 
-  if (!PciCreateUnicodeString(DeviceID, Buffer, PagedPool))
+  if (!RtlCreateUnicodeString(DeviceID, Buffer))
   {
     return FALSE;
   }
@@ -311,12 +253,12 @@
   {
      //DPRINT("xbox ohci controler found at bus 0x%lX, dev num %d, func num %d\n", Device->BusNumber, Device->SlotNumber.u.bits.DeviceNumber, Device->SlotNumber.u.bits.FunctionNumber);
 	 if (Device->SlotNumber.u.bits.DeviceNumber == 2)
-       return PciCreateUnicodeString(InstanceID, L"0000", PagedPool);
+       return RtlCreateUnicodeString(InstanceID, L"0000");
 	 else
-       return PciCreateUnicodeString(InstanceID, L"0001", PagedPool);
+       return RtlCreateUnicodeString(InstanceID, L"0001");
   }
   else
-	return PciCreateUnicodeString(InstanceID, L"0000", PagedPool);
+	return RtlCreateUnicodeString(InstanceID, L"0000");
 }
 
 

Modified: trunk/reactos/drivers/bus/pci/pci.h
--- trunk/reactos/drivers/bus/pci/pci.h	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/bus/pci/pci.h	2005-10-06 21:39:18 UTC (rev 18302)
@@ -112,12 +112,6 @@
   PWSTR Source,
   POOL_TYPE PoolType);
 
-NTSTATUS
-PciDuplicateUnicodeString(
-  PUNICODE_STRING Destination,
-  PUNICODE_STRING Source,
-  POOL_TYPE PoolType);
-
 BOOLEAN
 PciCreateDeviceIDString(
   PUNICODE_STRING DeviceID,
@@ -160,4 +154,10 @@
   PDEVICE_OBJECT DeviceObject,
   PIRP Irp);
 
+NTSTATUS
+STDCALL
+DriverEntry(
+  IN PDRIVER_OBJECT DriverObject,
+  IN PUNICODE_STRING RegistryPath);
+
 #endif  /*  __PCI_H  */

Modified: trunk/reactos/drivers/bus/pci/pdo.c
--- trunk/reactos/drivers/bus/pci/pdo.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/bus/pci/pdo.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -9,6 +9,7 @@
  */
 
 #include <ddk/ntddk.h>
+#include <ddk/ntifs.h>
 #include <initguid.h>
 #include <ddk/wdmguid.h>
 #include "pcidef.h"
@@ -77,10 +78,10 @@
 
   switch (IrpSp->Parameters.QueryId.IdType) {
     case BusQueryDeviceID:
-      Status = PciDuplicateUnicodeString(
-        &String,
+      Status = RtlDuplicateUnicodeString(
+        RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE,
         &DeviceExtension->DeviceID,
-        PagedPool);
+        &String);
 
       DPRINT("DeviceID: %S\n", String.Buffer);
 
@@ -88,28 +89,28 @@
       break;
 
     case BusQueryHardwareIDs:
-      Status = PciDuplicateUnicodeString(
-        &String,
+      Status = RtlDuplicateUnicodeString(
+        RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE,
         &DeviceExtension->HardwareIDs,
-        PagedPool);
+        &String);
 
       Irp->IoStatus.Information = (ULONG_PTR)String.Buffer;
       break;
 
     case BusQueryCompatibleIDs:
-      Status = PciDuplicateUnicodeString(
-        &String,
+      Status = RtlDuplicateUnicodeString(
+        RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE,
         &DeviceExtension->CompatibleIDs,
-        PagedPool);
+        &String);
 
       Irp->IoStatus.Information = (ULONG_PTR)String.Buffer;
       break;
 
     case BusQueryInstanceID:
-      Status = PciDuplicateUnicodeString(
-        &String,
+      Status = RtlDuplicateUnicodeString(
+        RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE,
         &DeviceExtension->InstanceID,
-        PagedPool);
+        &String);
 
       DPRINT("InstanceID: %S\n", String.Buffer);
 

Modified: trunk/reactos/drivers/bus/serenum/detect.c
--- trunk/reactos/drivers/bus/serenum/detect.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/bus/serenum/detect.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -167,15 +167,15 @@
 	FdoDeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
 	RtlZeroMemory(PdoDeviceExtension, sizeof(PDO_DEVICE_EXTENSION));
 	PdoDeviceExtension->Common.IsFDO = FALSE;
-	Status = SerenumDuplicateUnicodeString(&PdoDeviceExtension->DeviceDescription, DeviceDescription, PagedPool);
+	Status = RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, DeviceDescription, &PdoDeviceExtension->DeviceDescription);
 	if (!NT_SUCCESS(Status)) goto ByeBye;
-	Status = SerenumDuplicateUnicodeString(&PdoDeviceExtension->DeviceId, DeviceId, PagedPool);
+	Status = RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, DeviceId, &PdoDeviceExtension->DeviceId);
 	if (!NT_SUCCESS(Status)) goto ByeBye;
-	Status = SerenumDuplicateUnicodeString(&PdoDeviceExtension->InstanceId, InstanceId, PagedPool);
+	Status = RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, InstanceId, &PdoDeviceExtension->InstanceId);
 	if (!NT_SUCCESS(Status)) goto ByeBye;
-	Status = SerenumDuplicateUnicodeString(&PdoDeviceExtension->HardwareIds, HardwareIds, PagedPool);
+	Status = RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, HardwareIds, &PdoDeviceExtension->HardwareIds);
 	if (!NT_SUCCESS(Status)) goto ByeBye;
-	Status = SerenumDuplicateUnicodeString(&PdoDeviceExtension->CompatibleIds, CompatibleIds, PagedPool);
+	Status = RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, CompatibleIds, &PdoDeviceExtension->CompatibleIds);
 	if (!NT_SUCCESS(Status)) goto ByeBye;
 
 	/* Device attached to serial port (Pdo) may delegate work to

Modified: trunk/reactos/drivers/bus/serenum/fdo.c
--- trunk/reactos/drivers/bus/serenum/fdo.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/bus/serenum/fdo.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -68,7 +68,7 @@
 	return STATUS_SUCCESS;
 }
 
-NTSTATUS STDCALL
+static NTSTATUS STDCALL
 SerenumFdoStartDevice(
 	IN PDEVICE_OBJECT DeviceObject,
 	IN PIRP Irp)
@@ -93,7 +93,7 @@
 	return STATUS_SUCCESS;
 }
 
-NTSTATUS
+static NTSTATUS
 SerenumFdoQueryBusRelations(
 	IN PDEVICE_OBJECT DeviceObject,
 	OUT PDEVICE_RELATIONS* pDeviceRelations)

Modified: trunk/reactos/drivers/bus/serenum/misc.c
--- trunk/reactos/drivers/bus/serenum/misc.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/bus/serenum/misc.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -11,33 +11,6 @@
 #include "serenum.h"
 #include <stdarg.h>
 
-NTSTATUS
-SerenumDuplicateUnicodeString(
-	OUT PUNICODE_STRING Destination,
-	IN PUNICODE_STRING Source,
-	IN POOL_TYPE PoolType)
-{
-	ASSERT(Destination);
-
-	if (Source == NULL)
-	{
-		RtlInitUnicodeString(Destination, NULL);
-		return STATUS_SUCCESS;
-	}
-
-	Destination->Buffer = ExAllocatePoolWithTag(PoolType, Source->MaximumLength, SERENUM_TAG);
-	if (Destination->Buffer == NULL)
-	{
-		return STATUS_INSUFFICIENT_RESOURCES;
-	}
-
-	Destination->MaximumLength = Source->MaximumLength;
-	Destination->Length = Source->Length;
-	RtlCopyMemory(Destination->Buffer, Source->Buffer, Source->MaximumLength);
-
-	return STATUS_SUCCESS;
-}
-
 /* I really want PCSZ strings as last arguments because
  * PnP ids are ANSI-encoded in PnP device string
  * identification */
@@ -113,7 +86,7 @@
 	return Status;
 }
 
-NTSTATUS STDCALL
+static NTSTATUS STDCALL
 ForwardIrpAndWaitCompletion(
 	IN PDEVICE_OBJECT DeviceObject,
 	IN PIRP Irp,

Modified: trunk/reactos/drivers/bus/serenum/pdo.c
--- trunk/reactos/drivers/bus/serenum/pdo.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/bus/serenum/pdo.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -69,10 +69,10 @@
 			return STATUS_NOT_SUPPORTED;
 	}
 
-	Status = SerenumDuplicateUnicodeString(
-		&String,
+	Status = RtlDuplicateUnicodeString(
+		RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE,
 		SourceString,
-		PagedPool);
+		&String);
 	*Information = (ULONG_PTR)String.Buffer;
 	return Status;
 }

Modified: trunk/reactos/drivers/bus/serenum/serenum.c
--- trunk/reactos/drivers/bus/serenum/serenum.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/bus/serenum/serenum.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -11,7 +11,7 @@
 #define INITGUID
 #include "serenum.h"
 
-NTSTATUS STDCALL
+static NTSTATUS STDCALL
 SerenumPnp(
 	IN PDEVICE_OBJECT DeviceObject,
 	IN PIRP Irp)
@@ -22,13 +22,13 @@
 		return SerenumPdoPnp(DeviceObject, Irp);
 }
 
-VOID STDCALL
+static VOID STDCALL
 DriverUnload(IN PDRIVER_OBJECT DriverObject)
 {
 	// nothing to do here yet
 }
 
-NTSTATUS STDCALL
+static NTSTATUS STDCALL
 IrpStub(
 	IN PDEVICE_OBJECT DeviceObject,
 	IN PIRP Irp)

Modified: trunk/reactos/drivers/bus/serenum/serenum.h
--- trunk/reactos/drivers/bus/serenum/serenum.h	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/bus/serenum/serenum.h	2005-10-06 21:39:18 UTC (rev 18302)
@@ -8,6 +8,7 @@
  */
 
 #include <ntddk.h>
+#include <ntifs.h>
 #include <ntddser.h>
 #include <stdio.h>
 
@@ -107,12 +108,6 @@
 /************************************ misc.c */
 
 NTSTATUS
-SerenumDuplicateUnicodeString(
-	OUT PUNICODE_STRING Destination,
-	IN PUNICODE_STRING Source,
-	IN POOL_TYPE PoolType);
-
-NTSTATUS
 SerenumInitMultiSzString(
 	OUT PUNICODE_STRING Destination,
 	... /* list of PCSZ */);
@@ -143,3 +138,10 @@
 SerenumPdoPnp(
 	IN PDEVICE_OBJECT DeviceObject,
 	IN PIRP Irp);
+
+/************************************ serenum.c */
+
+NTSTATUS STDCALL
+DriverEntry(
+	IN PDRIVER_OBJECT DriverObject,
+	IN PUNICODE_STRING RegPath);

Modified: trunk/reactos/drivers/dd/beep/beep.c
--- trunk/reactos/drivers/dd/beep/beep.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/dd/beep/beep.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -18,6 +18,10 @@
 #define NDEBUG
 #include <debug.h>
 
+NTSTATUS STDCALL
+DriverEntry(PDRIVER_OBJECT DriverObject,
+            PUNICODE_STRING RegistryPath);
+
 /* TYEPEDEFS ***************************************************************/
 
 typedef struct _BEEP_DEVICE_EXTENSION

Modified: trunk/reactos/drivers/dd/blue/blue.c
--- trunk/reactos/drivers/dd/blue/blue.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/dd/blue/blue.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -67,6 +67,9 @@
 /* FUNCTIONS **************************************************************/
 
 NTSTATUS STDCALL
+DriverEntry (PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath);
+
+static NTSTATUS STDCALL
 ScrCreate(PDEVICE_OBJECT DeviceObject,
 	  PIRP Irp)
 {
@@ -156,7 +159,7 @@
 }
 
 
-NTSTATUS STDCALL
+static NTSTATUS STDCALL
 ScrWrite(PDEVICE_OBJECT DeviceObject,
 	 PIRP Irp)
 {
@@ -298,7 +301,7 @@
 }
 
 
-NTSTATUS STDCALL
+static NTSTATUS STDCALL
 ScrIoControl(PDEVICE_OBJECT DeviceObject,
 	     PIRP Irp)
 {
@@ -626,7 +629,7 @@
 }
 
 
-NTSTATUS STDCALL
+static NTSTATUS STDCALL
 ScrDispatch(PDEVICE_OBJECT DeviceObject,
 	    PIRP Irp)
 {

Modified: trunk/reactos/drivers/dd/bootvid/bootvid.c
--- trunk/reactos/drivers/dd/bootvid/bootvid.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/dd/bootvid/bootvid.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -221,7 +221,7 @@
 }
 
 
-BOOL STDCALL
+static BOOL STDCALL
 VidResetDisplay(VOID)
 {
    /*
@@ -233,7 +233,7 @@
 }
 
 
-VOID STDCALL
+static VOID STDCALL
 VidCleanUp(VOID)
 {
    InbvUnmapVideoMemory();
@@ -580,7 +580,7 @@
 }
 
 
-NTSTATUS STDCALL
+static NTSTATUS STDCALL
 VidDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 {
    PIO_STACK_LOCATION IrpSp;

Modified: trunk/reactos/drivers/dd/bootvid/bootvid.h
--- trunk/reactos/drivers/dd/bootvid/bootvid.h	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/dd/bootvid/bootvid.h	2005-10-06 21:39:18 UTC (rev 18302)
@@ -121,4 +121,7 @@
 extern VOID
 InbvPutPixels(int x, int y, unsigned long c);
 
+NTSTATUS STDCALL
+DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath);
+
 #endif /* _BOOTVID_H */

Modified: trunk/reactos/drivers/dd/debugout/debugout.c
--- trunk/reactos/drivers/dd/debugout/debugout.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/dd/debugout/debugout.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -24,8 +24,11 @@
 /* INCLUDES */
 #include <ddk/ntddk.h>
 
+NTSTATUS STDCALL
+DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath);
+
 /* FUNCTIONS */
-NTSTATUS STDCALL
+static NTSTATUS STDCALL
 DebugOutDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 {
   PIO_STACK_LOCATION piosStack = IoGetCurrentIrpStackLocation(Irp);
@@ -82,7 +85,7 @@
   return nErrCode;
 }
 
-VOID STDCALL
+static VOID STDCALL
 DebugOutUnload(PDRIVER_OBJECT DriverObject)
 {
 }

Modified: trunk/reactos/drivers/dd/mpu401/mpu401.c
--- trunk/reactos/drivers/dd/mpu401/mpu401.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/dd/mpu401/mpu401.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -28,7 +28,7 @@
 
 /* FUNCTIONS ***************************************************************/
 
-NTSTATUS InitDevice(
+static NTSTATUS InitDevice(
     IN PUNICODE_STRING RegistryPath,
     IN PVOID Context)
 {

Modified: trunk/reactos/drivers/dd/mpu401/mpu401.h
--- trunk/reactos/drivers/dd/mpu401/mpu401.h	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/dd/mpu401/mpu401.h	2005-10-06 21:39:18 UTC (rev 18302)
@@ -148,4 +148,8 @@
     IN  PVOID Context,
     IN  PVOID EntryContext);
 
+NTSTATUS STDCALL
+DriverEntry(PDRIVER_OBJECT DriverObject,
+	    PUNICODE_STRING RegistryPath);
+
 #endif

Modified: trunk/reactos/drivers/dd/mpu401/settings.c
--- trunk/reactos/drivers/dd/mpu401/settings.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/dd/mpu401/settings.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -17,8 +17,8 @@
 #include <debug.h>
 #include "sbdebug.h"  // our own debug helper
 
-
-NTSTATUS
+#if 0
+static NTSTATUS
 OpenDevicesKey(
     IN PWSTR RegistryPath,
     OUT PHANDLE Key)
@@ -67,9 +67,9 @@
 
     return s;
 }
+#endif
 
 
-
 NTSTATUS STDCALL EnumDeviceKeys(
     IN PUNICODE_STRING RegistryPath,
     IN PWSTR SubKey,
@@ -275,8 +275,8 @@
 }
 
 
-
-NTSTATUS SaveSettings(
+#if 0
+static NTSTATUS SaveSettings(
     IN  PWSTR RegistryPath,
     IN  ULONG Port,
     IN  ULONG IRQ,
@@ -303,3 +303,5 @@
 
     return STATUS_SUCCESS;
 }
+#endif
+

Modified: trunk/reactos/drivers/dd/null/null.c
--- trunk/reactos/drivers/dd/null/null.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/dd/null/null.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -23,7 +23,7 @@
 static const NULL_EXTENSION nxZero = NullZeroStream;
 
 /* FUNCTIONS */
-NTSTATUS STDCALL
+static NTSTATUS STDCALL
 NullDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
 {
     PIO_STACK_LOCATION piosStack = IoGetCurrentIrpStackLocation(Irp);
@@ -141,7 +141,7 @@
     return (nErrCode);
 }
 
-VOID STDCALL
+static VOID STDCALL
 NullUnload(PDRIVER_OBJECT DriverObject)
 {
 }

Modified: trunk/reactos/drivers/dd/null/null.h
--- trunk/reactos/drivers/dd/null/null.h	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/dd/null/null.h	2005-10-06 21:39:18 UTC (rev 18302)
@@ -16,4 +16,7 @@
 
 #define NULL_DEVICE_TYPE(__DEVICE__) (*((PNULL_EXTENSION)((__DEVICE__)->DeviceExtension)))
 
+NTSTATUS STDCALL
+DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath);
+
 /* EOF */

Modified: trunk/reactos/drivers/dd/parallel/parallel.c
--- trunk/reactos/drivers/dd/parallel/parallel.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/dd/parallel/parallel.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -24,6 +24,9 @@
 #define LP_S (READ_PORT_UCHAR((PUCHAR)(LP_B+1)))
 #define LP_C (LP_B+2)
 
+NTSTATUS STDCALL
+DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath);
+
 static void Parallel_Reset(void)
 /*
  * FUNCTION: Resets the device attached to the parallel port
@@ -68,7 +71,7 @@
 	WRITE_PORT_UCHAR((PUCHAR)LP_C, LP_PSELECP | LP_PINITP);
 }
 
-NTSTATUS STDCALL
+static NTSTATUS STDCALL
 Dispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
 /*
  * FUNCTION: Handles user mode requests

Modified: trunk/reactos/drivers/dd/ramdrv/ramdrv.c
--- trunk/reactos/drivers/dd/ramdrv/ramdrv.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/dd/ramdrv/ramdrv.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -4,7 +4,7 @@
 #include <debug.h>
 #include "../../lib/bzip2/bzlib.h"
 
-NTSTATUS STDCALL RamdrvDispatchDeviceControl(PDEVICE_OBJECT DeviceObject,
+static NTSTATUS STDCALL RamdrvDispatchDeviceControl(PDEVICE_OBJECT DeviceObject,
 					     PIRP Irp)
 {
    PIO_STACK_LOCATION IrpStack;
@@ -45,7 +45,7 @@
    return Status;
 }
 
-NTSTATUS STDCALL RamdrvDispatchReadWrite(PDEVICE_OBJECT DeviceObject,
+static NTSTATUS STDCALL RamdrvDispatchReadWrite(PDEVICE_OBJECT DeviceObject,
 					 PIRP Irp)
 {
   PRAMDRV_DEVICE_EXTENSION devext = (PRAMDRV_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
@@ -74,7 +74,7 @@
   return STATUS_SUCCESS;
 }
 
-NTSTATUS STDCALL RamdrvDispatchOpenClose(PDEVICE_OBJECT DeviceObject,
+static NTSTATUS STDCALL RamdrvDispatchOpenClose(PDEVICE_OBJECT DeviceObject,
 					 PIRP Irp)
 {
    DPRINT("RamdrvDispatchOpenClose\n");

Modified: trunk/reactos/drivers/dd/ramdrv/ramdrv.h
--- trunk/reactos/drivers/dd/ramdrv/ramdrv.h	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/dd/ramdrv/ramdrv.h	2005-10-06 21:39:18 UTC (rev 18302)
@@ -3,3 +3,6 @@
   unsigned long Size;
 } RAMDRV_DEVICE_EXTENSION, *PRAMDRV_DEVICE_EXTENSION;
 
+NTSTATUS STDCALL DriverEntry(IN PDRIVER_OBJECT DriverObject,
+			     IN PUNICODE_STRING RegistryPath);
+

Modified: trunk/reactos/drivers/dd/serial/devctrl.c
--- trunk/reactos/drivers/dd/serial/devctrl.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/dd/serial/devctrl.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -154,7 +154,7 @@
 	return Status;
 }
 
-BOOLEAN
+static BOOLEAN
 SerialClearPerfStats(
 	IN PSERIAL_DEVICE_EXTENSION DeviceExtension)
 {
@@ -165,7 +165,7 @@
 	return TRUE;
 }
 
-BOOLEAN
+static BOOLEAN
 SerialGetPerfStats(IN PIRP pIrp)
 {
 	PSERIAL_DEVICE_EXTENSION pDeviceExtension;
@@ -186,7 +186,7 @@
 	return TRUE;
 }
 
-NTSTATUS
+static NTSTATUS
 SerialGetCommProp(
 	OUT PSERIAL_COMMPROP pCommProp,
 	IN PSERIAL_DEVICE_EXTENSION DeviceExtension)
@@ -232,7 +232,7 @@
 	return STATUS_SUCCESS;
 }
 
-NTSTATUS
+static NTSTATUS
 SerialGetCommStatus(
 	OUT PSERIAL_STATUS pSerialStatus,
 	IN PSERIAL_DEVICE_EXTENSION DeviceExtension)

Modified: trunk/reactos/drivers/dd/serial/misc.c
--- trunk/reactos/drivers/dd/serial/misc.c	2005-10-06 21:18:59 UTC (rev 18301)
+++ trunk/reactos/drivers/dd/serial/misc.c	2005-10-06 21:39:18 UTC (rev 18302)
@@ -11,7 +11,7 @@
 #define NDEBUG
 #include "serial.h"
 
-NTSTATUS STDCALL
+static NTSTATUS STDCALL
 ForwardIrpAndWaitCompletion(
 	IN PDEVICE_OBJECT DeviceObject,
 	IN PIRP Irp,

Modified: trunk/reactos/drivers/dd/serial/serial.c
[truncated at 1000 lines; 2091 more skipped]