Commit bb3a968d authored by Christian Gmeiner's avatar Christian Gmeiner Committed by Alexandre Julliard

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

parent 65dbd2b1
...@@ -146,7 +146,7 @@ static inline BOOL CRYPT_UnicodeToANSI(LPCWSTR wstr, LPSTR* str, int strsize) ...@@ -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) static inline BOOL CRYPT_ANSIToUnicode(LPCSTR str, LPWSTR* wstr, int wstrsize)
{ {
int wcount; unsigned int wcount;
if (!str) if (!str)
{ {
......
...@@ -194,7 +194,7 @@ NTSTATUS WINAPI SystemFunction004(const struct ustring *in, ...@@ -194,7 +194,7 @@ NTSTATUS WINAPI SystemFunction004(const struct ustring *in,
unsigned int ui[2]; unsigned int ui[2];
} data; } data;
unsigned char deskey[7]; unsigned char deskey[7];
int crypt_len, ofs; unsigned int crypt_len, ofs;
if (key->Length<=0) if (key->Length<=0)
return STATUS_INVALID_PARAMETER_2; return STATUS_INVALID_PARAMETER_2;
...@@ -253,7 +253,7 @@ NTSTATUS WINAPI SystemFunction005(const struct ustring *in, ...@@ -253,7 +253,7 @@ NTSTATUS WINAPI SystemFunction005(const struct ustring *in,
unsigned int ui[2]; unsigned int ui[2];
} data; } data;
unsigned char deskey[7]; unsigned char deskey[7];
int ofs, crypt_len; unsigned int ofs, crypt_len;
if (key->Length<=0) if (key->Length<=0)
return STATUS_INVALID_PARAMETER_2; return STATUS_INVALID_PARAMETER_2;
......
...@@ -772,7 +772,7 @@ CreateWellKnownSid( WELL_KNOWN_SID_TYPE WellKnownSidType, ...@@ -772,7 +772,7 @@ CreateWellKnownSid( WELL_KNOWN_SID_TYPE WellKnownSidType,
PSID pSid, PSID pSid,
DWORD* cbSid) DWORD* cbSid)
{ {
int i; unsigned int i;
TRACE("(%d, %s, %p, %p)\n", WellKnownSidType, debugstr_sid(DomainSid), pSid, cbSid); TRACE("(%d, %s, %p, %p)\n", WellKnownSidType, debugstr_sid(DomainSid), pSid, cbSid);
if (DomainSid != NULL) { if (DomainSid != NULL) {
...@@ -811,7 +811,7 @@ CreateWellKnownSid( WELL_KNOWN_SID_TYPE WellKnownSidType, ...@@ -811,7 +811,7 @@ CreateWellKnownSid( WELL_KNOWN_SID_TYPE WellKnownSidType,
BOOL WINAPI BOOL WINAPI
IsWellKnownSid( PSID pSid, WELL_KNOWN_SID_TYPE WellKnownSidType ) IsWellKnownSid( PSID pSid, WELL_KNOWN_SID_TYPE WellKnownSidType )
{ {
int i; unsigned int i;
TRACE("(%s, %d)\n", debugstr_sid(pSid), WellKnownSidType); TRACE("(%s, %d)\n", debugstr_sid(pSid), WellKnownSidType);
for (i = 0; i < sizeof(WellKnownSids)/sizeof(WellKnownSids[0]); i++) for (i = 0; i < sizeof(WellKnownSids)/sizeof(WellKnownSids[0]); i++)
...@@ -1627,7 +1627,7 @@ LookupPrivilegeNameA( LPCSTR lpSystemName, PLUID lpLuid, LPSTR lpName, ...@@ -1627,7 +1627,7 @@ LookupPrivilegeNameA( LPCSTR lpSystemName, PLUID lpLuid, LPSTR lpName,
if (ret) if (ret)
{ {
/* Windows crashes if cchName is NULL, so will I */ /* 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); *cchName, NULL, NULL);
if (len == 0) if (len == 0)
...@@ -1870,7 +1870,7 @@ LookupAccountSidW( ...@@ -1870,7 +1870,7 @@ LookupAccountSidW(
IN OUT LPDWORD domainSize, IN OUT LPDWORD domainSize,
OUT PSID_NAME_USE name_use ) OUT PSID_NAME_USE name_use )
{ {
int i, j; unsigned int i, j;
const WCHAR * ac = NULL; const WCHAR * ac = NULL;
const WCHAR * dm = NULL; const WCHAR * dm = NULL;
SID_NAME_USE use = 0; SID_NAME_USE use = 0;
...@@ -3821,7 +3821,7 @@ static DWORD ComputeStringSidSize(LPCWSTR StringSid) ...@@ -3821,7 +3821,7 @@ static DWORD ComputeStringSidSize(LPCWSTR StringSid)
} }
else /* String constant format - Only available in winxp and above */ 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++) for (i = 0; i < sizeof(WellKnownSids)/sizeof(WellKnownSids[0]); i++)
if (!strncmpW(WellKnownSids[i].wstr, StringSid, 2)) if (!strncmpW(WellKnownSids[i].wstr, StringSid, 2))
...@@ -3915,7 +3915,7 @@ static BOOL ParseStringSidToSid(LPCWSTR StringSid, PSID pSid, LPDWORD cBytes) ...@@ -3915,7 +3915,7 @@ static BOOL ParseStringSidToSid(LPCWSTR StringSid, PSID pSid, LPDWORD cBytes)
} }
else /* String constant format - Only available in winxp and above */ else /* String constant format - Only available in winxp and above */
{ {
int i; unsigned int i;
pisid->Revision = SDDL_REVISION; pisid->Revision = SDDL_REVISION;
for (i = 0; i < sizeof(WellKnownSids)/sizeof(WellKnownSids[0]); i++) for (i = 0; i < sizeof(WellKnownSids)/sizeof(WellKnownSids[0]); i++)
......
...@@ -2319,7 +2319,7 @@ BOOL WINAPI GetServiceDisplayNameW( SC_HANDLE hSCManager, LPCWSTR lpServiceName, ...@@ -2319,7 +2319,7 @@ BOOL WINAPI GetServiceDisplayNameW( SC_HANDLE hSCManager, LPCWSTR lpServiceName,
if (!RegOpenKeyW(hscm->hkey, lpServiceName, &hkey)) if (!RegOpenKeyW(hscm->hkey, lpServiceName, &hkey))
{ {
INT len = lstrlenW(lpServiceName); UINT len = lstrlenW(lpServiceName);
BOOL r = FALSE; BOOL r = FALSE;
if ((*lpcchBuffer <= len) || (!lpDisplayName && *lpcchBuffer)) if ((*lpcchBuffer <= len) || (!lpDisplayName && *lpcchBuffer))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment