Author: cgutman
Date: Fri Jan 20 22:35:52 2012
New Revision: 55027
URL:
http://svn.reactos.org/svn/reactos?rev=55027&view=rev
Log:
[USB-BRINGUP-TRUNK]
- Fix uninitialized variable use and more build errors
Modified:
branches/usb-bringup-trunk/drivers/usb/usbhub_new/fdo.c
branches/usb-bringup-trunk/drivers/usb/usbhub_new/pdo.c
branches/usb-bringup-trunk/drivers/usb/usbstor/pdo.c
Modified: branches/usb-bringup-trunk/drivers/usb/usbhub_new/fdo.c
URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
==============================================================================
--- branches/usb-bringup-trunk/drivers/usb/usbhub_new/fdo.c [iso-8859-1] (original)
+++ branches/usb-bringup-trunk/drivers/usb/usbhub_new/fdo.c [iso-8859-1] Fri Jan 20
22:35:52 2012
@@ -800,7 +800,7 @@
CreateDeviceIds(
PDEVICE_OBJECT UsbChildDeviceObject)
{
- NTSTATUS Status;
+ NTSTATUS Status = STATUS_SUCCESS;
ULONG Index;
PWCHAR BufferPtr;
WCHAR Buffer[100];
@@ -965,6 +965,7 @@
if (UsbChildExtension->usInstanceId.Buffer == NULL)
{
DPRINT1("Error: failed to allocate %lu bytes\n", Index *
sizeof(WCHAR));
+ Status = STATUS_INSUFFICIENT_RESOURCES;
goto Cleanup;
}
Modified: branches/usb-bringup-trunk/drivers/usb/usbhub_new/pdo.c
URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
==============================================================================
--- branches/usb-bringup-trunk/drivers/usb/usbhub_new/pdo.c [iso-8859-1] (original)
+++ branches/usb-bringup-trunk/drivers/usb/usbhub_new/pdo.c [iso-8859-1] Fri Jan 20
22:35:52 2012
@@ -284,8 +284,8 @@
DPRINT1("Connect %x\n", ((PortStatus.Status &
USB_PORT_STATUS_CONNECT) << 1) << ((PortId - 1) * 2));
DPRINT1("Enable %x\n", ((PortStatus.Status &
USB_PORT_STATUS_ENABLE) >> 1) << ((PortId - 1) * 2));
*PortStatusBits +=
- ((PortStatus.Status & USB_PORT_STATUS_CONNECT) <<
1) << ((PortId - 1) * 2) +
- ((PortStatus.Status & USB_PORT_STATUS_ENABLE) >> 1)
<< ((PortId - 1) * 2);
+ (((PortStatus.Status & USB_PORT_STATUS_CONNECT) <<
1) << ((PortId - 1) * 2)) +
+ (((PortStatus.Status & USB_PORT_STATUS_ENABLE) >>
1) << ((PortId - 1) * 2));
}
}
Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/pdo.c
URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
==============================================================================
--- branches/usb-bringup-trunk/drivers/usb/usbstor/pdo.c [iso-8859-1] (original)
+++ branches/usb-bringup-trunk/drivers/usb/usbstor/pdo.c [iso-8859-1] Fri Jan 20 22:35:52
2012
@@ -153,7 +153,7 @@
ULONG
CopyField(
IN PUCHAR Name,
- IN PUCHAR Buffer,
+ IN PCHAR Buffer,
IN ULONG MaxLength)
{
ULONG Index;
@@ -261,7 +261,7 @@
{
PPDO_DEVICE_EXTENSION DeviceExtension;
NTSTATUS Status;
- UCHAR Buffer[100];
+ CHAR Buffer[100];
LPCSTR DeviceType;
ULONG Offset = 0;
PUFI_INQUIRY_RESPONSE InquiryData;