VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/ExpandVolume
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-11 09:07:51 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-11 15:28:19 (GMT)
commit46a3fe1458b6d34eb5f1b97e8fc6f60656cb3611 (patch)
tree848348ef001de15833d5d27c7efcc33851eae2d2 /src/ExpandVolume
parent6ed97738946b5ed7acd28116972a1fe720debc3d (diff)
downloadVeraCrypt-46a3fe1458b6d34eb5f1b97e8fc6f60656cb3611.zip
VeraCrypt-46a3fe1458b6d34eb5f1b97e8fc6f60656cb3611.tar.gz
Windows: fix compiler warnings
Diffstat (limited to 'src/ExpandVolume')
-rw-r--r--src/ExpandVolume/WinMain.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ExpandVolume/WinMain.cpp b/src/ExpandVolume/WinMain.cpp
index 70ea266..150ed83 100644
--- a/src/ExpandVolume/WinMain.cpp
+++ b/src/ExpandVolume/WinMain.cpp
@@ -428,13 +428,13 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
HWND hComboBox = GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID);
SendMessage (hComboBox, CB_RESETCONTENT, 0, 0);
- nIndex = SendMessageW (hComboBox, CB_ADDSTRING, 0, (LPARAM) GetString ("AUTODETECTION"));
- SendMessage (hComboBox, CB_SETITEMDATA, nIndex, (LPARAM) 0);
+ nIndex =(int) SendMessageW (hComboBox, CB_ADDSTRING, 0, (LPARAM) GetString ("AUTODETECTION"));
+ SendMessage (hComboBox, CB_SETITEMDATA, (WPARAM) nIndex, (LPARAM) 0);
for (i = FIRST_PRF_ID; i <= LAST_PRF_ID; i++)
{
- nIndex = SendMessage (hComboBox, CB_ADDSTRING, 0, (LPARAM) get_pkcs5_prf_name(i));
- SendMessage (hComboBox, CB_SETITEMDATA, nIndex, (LPARAM) i);
+ nIndex = (int) SendMessage (hComboBox, CB_ADDSTRING, 0, (LPARAM) get_pkcs5_prf_name(i));
+ SendMessage (hComboBox, CB_SETITEMDATA, (WPARAM) nIndex, (LPARAM) i);
}
/* make autodetection the default */
@@ -502,7 +502,7 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
HWND hComboBox = GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID);
SendMessage (hComboBox, CB_RESETCONTENT, 0, 0);
- int i, nIndex = SendMessageW (hComboBox, CB_ADDSTRING, 0, (LPARAM) GetString ("AUTODETECTION"));
+ int i, nIndex = (int) SendMessageW (hComboBox, CB_ADDSTRING, 0, (LPARAM) GetString ("AUTODETECTION"));
SendMessage (hComboBox, CB_SETITEMDATA, nIndex, (LPARAM) 0);
BOOL bIsGPT = FALSE;
@@ -517,8 +517,8 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
{
if (bIsGPT || HashForSystemEncryption(i))
{
- nIndex = SendMessage (hComboBox, CB_ADDSTRING, 0, (LPARAM) get_pkcs5_prf_name(i));
- SendMessage (hComboBox, CB_SETITEMDATA, nIndex, (LPARAM) i);
+ nIndex = (int) SendMessage (hComboBox, CB_ADDSTRING, 0, (LPARAM) get_pkcs5_prf_name(i));
+ SendMessage (hComboBox, CB_SETITEMDATA, (WPARAM) nIndex, (LPARAM) i);
}
}
@@ -677,7 +677,7 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
KeyFilesApply (hwndDlg, &mountOptions.ProtectedHidVolPassword, hidVolProtKeyFilesParam.FirstKeyFile, PasswordDlgVolume);
if (GetPassword (hwndDlg, IDC_PASSWORD, (LPSTR) szXPwd->Text, MAX_PASSWORD + 1, TRUE))
- szXPwd->Length = strlen ((char *) szXPwd->Text);
+ szXPwd->Length = (unsigned __int32) (strlen ((char *) szXPwd->Text));
else
return 1;
@@ -803,7 +803,7 @@ int RestoreVolumeHeader (HWND hwndDlg, char *lpszVolume)
int ExtcvAskVolumePassword (HWND hwndDlg, const wchar_t* fileName, Password *password, int *pkcs5, int *pim, BOOL* truecryptMode, char *titleStringId, BOOL enableMountOptions)
{
- int result;
+ INT_PTR result;
PasswordDlgParam dlgParam;
PasswordDialogTitleStringId = titleStringId;
@@ -850,7 +850,7 @@ static BOOL SelectPartition (HWND hwndDlg)
{
RawDevicesDlgParam param;
param.pszFileName = szFileName;
- int nResult = DialogBoxParamW (hInst, MAKEINTRESOURCEW (IDD_RAWDEVICES_DLG), hwndDlg,
+ INT_PTR nResult = DialogBoxParamW (hInst, MAKEINTRESOURCEW (IDD_RAWDEVICES_DLG), hwndDlg,
(DLGPROC) RawDevicesDlgProc, (LPARAM) & param);
if (nResult == IDOK)
{