advapi32: fix some compiler warnings when using -Wsign-compare.

This commit is contained in:
Christian Gmeiner 2007-09-21 20:17:23 +00:00 committed by Alexandre Julliard
parent 65dbd2b114
commit bb3a968d30
4 changed files with 10 additions and 10 deletions

View File

@ -146,7 +146,7 @@ static inline BOOL CRYPT_UnicodeToANSI(LPCWSTR wstr, LPSTR* str, int strsize)
*/
static inline BOOL CRYPT_ANSIToUnicode(LPCSTR str, LPWSTR* wstr, int wstrsize)
{
int wcount;
unsigned int wcount;
if (!str)
{

View File

@ -194,7 +194,7 @@ NTSTATUS WINAPI SystemFunction004(const struct ustring *in,
unsigned int ui[2];
} data;
unsigned char deskey[7];
int crypt_len, ofs;
unsigned int crypt_len, ofs;
if (key->Length<=0)
return STATUS_INVALID_PARAMETER_2;
@ -253,7 +253,7 @@ NTSTATUS WINAPI SystemFunction005(const struct ustring *in,
unsigned int ui[2];
} data;
unsigned char deskey[7];
int ofs, crypt_len;
unsigned int ofs, crypt_len;
if (key->Length<=0)
return STATUS_INVALID_PARAMETER_2;

View File

@ -772,7 +772,7 @@ CreateWellKnownSid( WELL_KNOWN_SID_TYPE WellKnownSidType,
PSID pSid,
DWORD* cbSid)
{
int i;
unsigned int i;
TRACE("(%d, %s, %p, %p)\n", WellKnownSidType, debugstr_sid(DomainSid), pSid, cbSid);
if (DomainSid != NULL) {
@ -811,7 +811,7 @@ CreateWellKnownSid( WELL_KNOWN_SID_TYPE WellKnownSidType,
BOOL WINAPI
IsWellKnownSid( PSID pSid, WELL_KNOWN_SID_TYPE WellKnownSidType )
{
int i;
unsigned int i;
TRACE("(%s, %d)\n", debugstr_sid(pSid), WellKnownSidType);
for (i = 0; i < sizeof(WellKnownSids)/sizeof(WellKnownSids[0]); i++)
@ -1627,7 +1627,7 @@ LookupPrivilegeNameA( LPCSTR lpSystemName, PLUID lpLuid, LPSTR lpName,
if (ret)
{
/* Windows crashes if cchName is NULL, so will I */
int len = WideCharToMultiByte(CP_ACP, 0, lpNameW, -1, lpName,
unsigned int len = WideCharToMultiByte(CP_ACP, 0, lpNameW, -1, lpName,
*cchName, NULL, NULL);
if (len == 0)
@ -1870,7 +1870,7 @@ LookupAccountSidW(
IN OUT LPDWORD domainSize,
OUT PSID_NAME_USE name_use )
{
int i, j;
unsigned int i, j;
const WCHAR * ac = NULL;
const WCHAR * dm = NULL;
SID_NAME_USE use = 0;
@ -3821,7 +3821,7 @@ static DWORD ComputeStringSidSize(LPCWSTR StringSid)
}
else /* String constant format - Only available in winxp and above */
{
int i;
unsigned int i;
for (i = 0; i < sizeof(WellKnownSids)/sizeof(WellKnownSids[0]); i++)
if (!strncmpW(WellKnownSids[i].wstr, StringSid, 2))
@ -3915,7 +3915,7 @@ static BOOL ParseStringSidToSid(LPCWSTR StringSid, PSID pSid, LPDWORD cBytes)
}
else /* String constant format - Only available in winxp and above */
{
int i;
unsigned int i;
pisid->Revision = SDDL_REVISION;
for (i = 0; i < sizeof(WellKnownSids)/sizeof(WellKnownSids[0]); i++)

View File

@ -2319,7 +2319,7 @@ BOOL WINAPI GetServiceDisplayNameW( SC_HANDLE hSCManager, LPCWSTR lpServiceName,
if (!RegOpenKeyW(hscm->hkey, lpServiceName, &hkey))
{
INT len = lstrlenW(lpServiceName);
UINT len = lstrlenW(lpServiceName);
BOOL r = FALSE;
if ((*lpcchBuffer <= len) || (!lpDisplayName && *lpcchBuffer))