From 279e2f65b3d68711080c39871214a66b09556b81 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 14 Feb 2015 19:07:36 +0000 Subject: [PATCH] [DRIVERS] Fix a few MSVC warnings svn path=/trunk/; revision=66269 --- reactos/drivers/bus/acpi/busmgr/power.c | 20 +++++++++++--------- reactos/drivers/usb/usbhub/fdo.c | 2 +- reactos/drivers/usb/usbhub/pdo.c | 2 +- reactos/drivers/usb/usbstor/fdo.c | 6 +++--- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/reactos/drivers/bus/acpi/busmgr/power.c b/reactos/drivers/bus/acpi/busmgr/power.c index c6ae058f3f8..f810e9108d0 100644 --- a/reactos/drivers/bus/acpi/busmgr/power.c +++ b/reactos/drivers/bus/acpi/busmgr/power.c @@ -28,7 +28,7 @@ * 1. via "Device Specific (D-State) Control" * 2. via "Power Resource Control". * This module is used to manage devices relying on Power Resource Control. - * + * * An ACPI "power resource object" describes a software controllable power * plane, clock plane, or other resource used by a power managed device. * A device may rely on multiple power resources, and a power resource @@ -37,7 +37,7 @@ /* * Modified for ReactOS and latest ACPICA - * Copyright (C)2009 Samuel Serapion + * Copyright (C)2009 Samuel Serapion */ #include @@ -346,13 +346,14 @@ int acpi_device_sleep_wake(struct acpi_device *dev, /* * Prepare a wakeup device, two steps (Ref ACPI 2.0:P229): - * 1. Power on the power resources required for the wakeup device + * 1. Power on the power resources required for the wakeup device * 2. Execute _DSW (Device Sleep Wake) or (deprecated in ACPI 3.0) _PSW (Power * State Wake) for the device, if present */ int acpi_enable_wakeup_device_power(struct acpi_device *dev, int sleep_state) { - int i, err = 0; + unsigned int i; + int err = 0; if (!dev || !dev->wakeup.flags.valid) return -1; @@ -396,7 +397,8 @@ int acpi_enable_wakeup_device_power(struct acpi_device *dev, int sleep_state) */ int acpi_disable_wakeup_device_power(struct acpi_device *dev) { - int i, err = 0; + unsigned int i; + int err = 0; if (!dev || !dev->wakeup.flags.valid) return -1; @@ -486,7 +488,7 @@ acpi_power_transition ( int result = 0; struct acpi_handle_list *cl = NULL; /* Current Resources */ struct acpi_handle_list *tl = NULL; /* Target Resources */ - int i = 0; + unsigned int i = 0; if (!device || (state < ACPI_STATE_D0) || (state > ACPI_STATE_D3)) return_VALUE(-1); @@ -589,14 +591,14 @@ acpi_power_add ( break; } - + DPRINT("%s [%s] (%s)\n", acpi_device_name(device), acpi_device_bid(device), state?"on":"off"); end: if (result) ExFreePool(resource); - + return result; } @@ -654,7 +656,7 @@ static int acpi_power_resume(struct acpi_device *device, int state) return 0; } -int +int acpi_power_init (void) { int result = 0; diff --git a/reactos/drivers/usb/usbhub/fdo.c b/reactos/drivers/usb/usbhub/fdo.c index 4e954cc33c8..0e965e3fa01 100644 --- a/reactos/drivers/usb/usbhub/fdo.c +++ b/reactos/drivers/usb/usbhub/fdo.c @@ -210,7 +210,7 @@ DeviceStatusChangeThread( PHUB_DEVICE_EXTENSION HubDeviceExtension; PWORK_ITEM_DATA WorkItemData; PORT_STATUS_CHANGE PortStatus; - LONG PortId; + ULONG PortId; BOOLEAN SignalResetComplete = FALSE; DPRINT("Entered DeviceStatusChangeThread, Context %x\n", Context); diff --git a/reactos/drivers/usb/usbhub/pdo.c b/reactos/drivers/usb/usbhub/pdo.c index 9a1f50de850..9c3e06851de 100644 --- a/reactos/drivers/usb/usbhub/pdo.c +++ b/reactos/drivers/usb/usbhub/pdo.c @@ -307,7 +307,7 @@ USBHUB_PdoHandleInternalDeviceControl( case IOCTL_INTERNAL_USB_GET_PORT_STATUS: { PORT_STATUS_CHANGE PortStatus; - LONG PortId; + ULONG PortId; PUCHAR PortStatusBits; PortStatusBits = (PUCHAR)Stack->Parameters.Others.Argument1; diff --git a/reactos/drivers/usb/usbstor/fdo.c b/reactos/drivers/usb/usbstor/fdo.c index f1c7643dd3b..ffc783ac7a2 100644 --- a/reactos/drivers/usb/usbstor/fdo.c +++ b/reactos/drivers/usb/usbstor/fdo.c @@ -40,7 +40,7 @@ USBSTOR_FdoHandleDeviceRelations( IN OUT PIRP Irp) { ULONG DeviceCount = 0; - ULONG Index; + LONG Index; PDEVICE_RELATIONS DeviceRelations; PIO_STACK_LOCATION IoStack; @@ -63,7 +63,7 @@ USBSTOR_FdoHandleDeviceRelations( // // go through array and count device objects // - for(Index = 0; Index < max(DeviceExtension->MaxLUN, 1); Index++) + for (Index = 0; Index < max(DeviceExtension->MaxLUN, 1); Index++) { if (DeviceExtension->ChildPDO[Index]) { @@ -391,7 +391,7 @@ USBSTOR_FdoHandlePnp( case IRP_MN_QUERY_CAPABILITIES: { // - // FIXME: set custom capabilities + // FIXME: set custom capabilities // IoSkipCurrentIrpStackLocation(Irp); return IoCallDriver(DeviceExtension->LowerDeviceObject, Irp);