From: Jeffrey Altman Date: Tue, 19 Jun 2012 01:58:26 +0000 (-0400) Subject: Windows: afslogon cast away warnings X-Git-Tag: upstream/1.8.0_pre1^2~2266 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=76ae0f01b32d3e87273ff6d2c9c20eec59e22e16;p=packages%2Fo%2Fopenafs.git Windows: afslogon cast away warnings cast away size_t to int warnings in 64-bit builds. Change-Id: I1200fe6235d75f87c5d8e78496baae29b3c5242c Reviewed-on: http://gerrit.openafs.org/7634 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/afslogon.c b/src/WINNT/afsd/afslogon.c index 147fb34d3..abe31b196 100644 --- a/src/WINNT/afsd/afslogon.c +++ b/src/WINNT/afsd/afslogon.c @@ -1329,11 +1329,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); @@ -1426,11 +1426,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");