From: Jeffrey Altman Date: Tue, 19 Jun 2012 01:58:26 +0000 (-0400) Subject: Windows: afslogon cast away warnings X-Git-Tag: upstream/1.6.2_pre2^2~40 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=2498cbbce8eb99c9d72536a37d9da87f5e9b3161;p=packages%2Fo%2Fopenafs.git Windows: afslogon cast away warnings cast away size_t to int warnings in 64-bit builds. Reviewed-on: http://gerrit.openafs.org/7634 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 76ae0f01b32d3e87273ff6d2c9c20eec59e22e16) Change-Id: I81ba08a273aedb412642c345cd4a2762fcf1edb7 Reviewed-on: http://gerrit.openafs.org/8636 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/afslogon.c b/src/WINNT/afsd/afslogon.c index d3553e9ce..78d82ab52 100644 --- a/src/WINNT/afsd/afslogon.c +++ b/src/WINNT/afsd/afslogon.c @@ -1314,11 +1314,11 @@ VOID AFS_Logoff_Event( PWLX_NOTIFICATION_INFO pInfo ) size_t szlen = 0; StringCchLengthW(pInfo->UserName, MAX_USERNAME_LENGTH, &szlen); - WideCharToMultiByte(CP_UTF8, 0, pInfo->UserName, szlen, + WideCharToMultiByte(CP_UTF8, 0, pInfo->UserName, (int)szlen, username, sizeof(username), NULL, NULL); StringCchLengthW(pInfo->Domain, MAX_DOMAIN_LENGTH, &szlen); - WideCharToMultiByte(CP_UTF8, 0, pInfo->Domain, szlen, + WideCharToMultiByte(CP_UTF8, 0, pInfo->Domain, (int)szlen, domain, sizeof(domain), NULL, NULL); GetDomainLogonOptions(NULL, username, domain, &opt); @@ -1411,11 +1411,11 @@ VOID AFS_Logon_Event( PWLX_NOTIFICATION_INFO pInfo ) DebugEvent0("AFS_Logon_Event - pInfo UserName and Domain"); StringCchLengthW(pInfo->UserName, MAX_USERNAME_LENGTH, &szlen); - WideCharToMultiByte(CP_UTF8, 0, pInfo->UserName, szlen, + WideCharToMultiByte(CP_UTF8, 0, pInfo->UserName, (int)szlen, username, sizeof(username), NULL, NULL); StringCchLengthW(pInfo->Domain, MAX_DOMAIN_LENGTH, &szlen); - WideCharToMultiByte(CP_UTF8, 0, pInfo->Domain, szlen, + WideCharToMultiByte(CP_UTF8, 0, pInfo->Domain, (int)szlen, domain, sizeof(domain), NULL, NULL); DebugEvent0("AFS_Logon_Event - Calling GetDomainLogonOptions");