setupapi: Sign-compare warnings fix.

This commit is contained in:
Andrew Talbot 2008-11-10 19:37:42 +00:00 committed by Alexandre Julliard
parent 583e051044
commit 1c64c934db
3 changed files with 6 additions and 5 deletions

View file

@ -1349,7 +1349,8 @@ BOOL WINAPI SetupDiCreateDeviceInfoA(
static DWORD SETUPDI_DevNameToDevID(LPCWSTR devName)
{
LPCWSTR ptr;
DWORD devNameLen = lstrlenW(devName), devInst = 0;
int devNameLen = lstrlenW(devName);
DWORD devInst = 0;
BOOL valid = TRUE;
TRACE("%s\n", debugstr_w(devName));
@ -1704,7 +1705,7 @@ BOOL WINAPI SetupDiGetDeviceInstanceIdW(
return FALSE;
}
TRACE("instance ID: %s\n", debugstr_w(devInfo->instanceId));
if (DeviceInstanceIdSize < lstrlenW(devInfo->instanceId) + 1)
if (DeviceInstanceIdSize < strlenW(devInfo->instanceId) + 1)
{
SetLastError(ERROR_INSUFFICIENT_BUFFER);
if (RequiredSize)

View file

@ -199,7 +199,7 @@ static struct line *find_line( struct inf_file *file, int section_index, const W
{
struct section *section;
struct line *line;
int i;
unsigned int i;
if (section_index < 0 || section_index >= file->nb_sections) return NULL;
section = file->sections[section_index];

View file

@ -580,7 +580,7 @@ BOOL WINAPI SetupGetTargetPathW( HINF hinf, PINFCONTEXT context, PCWSTR section,
INFCONTEXT ctx;
WCHAR *dir;
INT size;
unsigned int size;
TRACE("%p, %p, %s, %p, 0x%08x, %p\n", hinf, context, debugstr_w(section), buffer,
buffer_size, required_size);
@ -591,7 +591,7 @@ BOOL WINAPI SetupGetTargetPathW( HINF hinf, PINFCONTEXT context, PCWSTR section,
if (!(dir = PARSER_get_dest_dir( context ? context : &ctx ))) return FALSE;
size = lstrlenW( dir ) + 1;
size = strlenW( dir ) + 1;
if (required_size) *required_size = size;
if (buffer)