[DRIVERS]

Fix a few MSVC warnings

svn path=/trunk/; revision=66269
This commit is contained in:
Timo Kreuzer 2015-02-14 19:07:36 +00:00
parent 2566611f13
commit 279e2f65b3
4 changed files with 16 additions and 14 deletions

View file

@ -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 <precomp.h>
@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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);