mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows: fix compiler warnings
This commit is contained in:
@@ -2223,8 +2223,6 @@ namespace VeraCrypt
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EfiBoot::MountBootPartition(WCHAR letter) {
|
void EfiBoot::MountBootPartition(WCHAR letter) {
|
||||||
NTSTATUS res;
|
|
||||||
ULONG len;
|
|
||||||
if (!bBootVolumePathSelected) {
|
if (!bBootVolumePathSelected) {
|
||||||
SelectBootVolumeESP();
|
SelectBootVolumeESP();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ void LoadCombo (HWND hComboBox, BOOL bEnabled, BOOL bOnlyCheckModified, BOOL *pb
|
|||||||
char *xml = history;
|
char *xml = history;
|
||||||
char volume[MAX_PATH];
|
char volume[MAX_PATH];
|
||||||
int i, nComboIdx[SIZEOF_MRU_LIST] = {0};
|
int i, nComboIdx[SIZEOF_MRU_LIST] = {0};
|
||||||
int count = SendMessage (hComboBox, CB_GETCOUNT, 0, 0);
|
int count = (int) SendMessage (hComboBox, CB_GETCOUNT, 0, 0);
|
||||||
|
|
||||||
if (xml == NULL)
|
if (xml == NULL)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3416,7 +3416,7 @@ BOOL CALLBACK TextEditDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
|
|||||||
if (!prm->ReadOnly)
|
if (!prm->ReadOnly)
|
||||||
{
|
{
|
||||||
prm->Text.resize(GetWindowTextLengthA (GetDlgItem (hwndDlg, IDC_INFO_BOX_TEXT)) + 1);
|
prm->Text.resize(GetWindowTextLengthA (GetDlgItem (hwndDlg, IDC_INFO_BOX_TEXT)) + 1);
|
||||||
GetWindowTextA (GetDlgItem (hwndDlg, IDC_INFO_BOX_TEXT), &(prm->Text)[0], prm->Text.size());
|
GetWindowTextA (GetDlgItem (hwndDlg, IDC_INFO_BOX_TEXT), &(prm->Text)[0], (int) prm->Text.size());
|
||||||
}
|
}
|
||||||
NormalCursor ();
|
NormalCursor ();
|
||||||
EndDialog (hwndDlg, IDOK);
|
EndDialog (hwndDlg, IDOK);
|
||||||
|
|||||||
@@ -428,13 +428,13 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
|
|||||||
HWND hComboBox = GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID);
|
HWND hComboBox = GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID);
|
||||||
SendMessage (hComboBox, CB_RESETCONTENT, 0, 0);
|
SendMessage (hComboBox, CB_RESETCONTENT, 0, 0);
|
||||||
|
|
||||||
nIndex = SendMessageW (hComboBox, CB_ADDSTRING, 0, (LPARAM) GetString ("AUTODETECTION"));
|
nIndex =(int) SendMessageW (hComboBox, CB_ADDSTRING, 0, (LPARAM) GetString ("AUTODETECTION"));
|
||||||
SendMessage (hComboBox, CB_SETITEMDATA, nIndex, (LPARAM) 0);
|
SendMessage (hComboBox, CB_SETITEMDATA, (WPARAM) nIndex, (LPARAM) 0);
|
||||||
|
|
||||||
for (i = FIRST_PRF_ID; i <= LAST_PRF_ID; i++)
|
for (i = FIRST_PRF_ID; i <= LAST_PRF_ID; i++)
|
||||||
{
|
{
|
||||||
nIndex = SendMessage (hComboBox, CB_ADDSTRING, 0, (LPARAM) get_pkcs5_prf_name(i));
|
nIndex = (int) SendMessage (hComboBox, CB_ADDSTRING, 0, (LPARAM) get_pkcs5_prf_name(i));
|
||||||
SendMessage (hComboBox, CB_SETITEMDATA, nIndex, (LPARAM) i);
|
SendMessage (hComboBox, CB_SETITEMDATA, (WPARAM) nIndex, (LPARAM) i);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make autodetection the default */
|
/* 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);
|
HWND hComboBox = GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID);
|
||||||
SendMessage (hComboBox, CB_RESETCONTENT, 0, 0);
|
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);
|
SendMessage (hComboBox, CB_SETITEMDATA, nIndex, (LPARAM) 0);
|
||||||
|
|
||||||
BOOL bIsGPT = FALSE;
|
BOOL bIsGPT = FALSE;
|
||||||
@@ -517,8 +517,8 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
|
|||||||
{
|
{
|
||||||
if (bIsGPT || HashForSystemEncryption(i))
|
if (bIsGPT || HashForSystemEncryption(i))
|
||||||
{
|
{
|
||||||
nIndex = SendMessage (hComboBox, CB_ADDSTRING, 0, (LPARAM) get_pkcs5_prf_name(i));
|
nIndex = (int) SendMessage (hComboBox, CB_ADDSTRING, 0, (LPARAM) get_pkcs5_prf_name(i));
|
||||||
SendMessage (hComboBox, CB_SETITEMDATA, nIndex, (LPARAM) 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);
|
KeyFilesApply (hwndDlg, &mountOptions.ProtectedHidVolPassword, hidVolProtKeyFilesParam.FirstKeyFile, PasswordDlgVolume);
|
||||||
|
|
||||||
if (GetPassword (hwndDlg, IDC_PASSWORD, (LPSTR) szXPwd->Text, MAX_PASSWORD + 1, TRUE))
|
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
|
else
|
||||||
return 1;
|
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 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;
|
PasswordDlgParam dlgParam;
|
||||||
|
|
||||||
PasswordDialogTitleStringId = titleStringId;
|
PasswordDialogTitleStringId = titleStringId;
|
||||||
@@ -850,7 +850,7 @@ static BOOL SelectPartition (HWND hwndDlg)
|
|||||||
{
|
{
|
||||||
RawDevicesDlgParam param;
|
RawDevicesDlgParam param;
|
||||||
param.pszFileName = szFileName;
|
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);
|
(DLGPROC) RawDevicesDlgProc, (LPARAM) & param);
|
||||||
if (nResult == IDOK)
|
if (nResult == IDOK)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6134,8 +6134,8 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
|||||||
if (nVolumeSize < (bHiddenVolHost ? TC_MIN_HIDDEN_VOLUME_HOST_SIZE : (bHiddenVol ? TC_MIN_HIDDEN_VOLUME_SIZE : TC_MIN_VOLUME_SIZE)))
|
if (nVolumeSize < (bHiddenVolHost ? TC_MIN_HIDDEN_VOLUME_HOST_SIZE : (bHiddenVol ? TC_MIN_HIDDEN_VOLUME_SIZE : TC_MIN_VOLUME_SIZE)))
|
||||||
AbortProcess ("ERR_VOLUME_SIZE_TOO_SMALL");
|
AbortProcess ("ERR_VOLUME_SIZE_TOO_SMALL");
|
||||||
|
|
||||||
if ( ((!bHiddenVolHost && bHiddenVol) && (nVolumeSize > nMaximumHiddenVolSize))
|
if ( ((!bHiddenVolHost && bHiddenVol) && (nVolumeSize > (unsigned __int64) nMaximumHiddenVolSize))
|
||||||
|| (nVolumeSize > (bHiddenVolHost ? TC_MAX_HIDDEN_VOLUME_HOST_SIZE : TC_MAX_VOLUME_SIZE))
|
|| (nVolumeSize > (unsigned __int64) (bHiddenVolHost ? TC_MAX_HIDDEN_VOLUME_HOST_SIZE : TC_MAX_VOLUME_SIZE))
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
AbortProcess ("ERR_VOLUME_SIZE_TOO_BIG");
|
AbortProcess ("ERR_VOLUME_SIZE_TOO_BIG");
|
||||||
|
|||||||
@@ -11065,7 +11065,7 @@ static BOOL CALLBACK BootLoaderPreferencesDlgProc (HWND hwndDlg, UINT msg, WPARA
|
|||||||
{
|
{
|
||||||
platforminfo = ReadESPFile (L"\\EFI\\VeraCrypt\\PlatformInfo", true);
|
platforminfo = ReadESPFile (L"\\EFI\\VeraCrypt\\PlatformInfo", true);
|
||||||
}
|
}
|
||||||
catch (Exception &e) {}
|
catch (Exception &) {}
|
||||||
|
|
||||||
if (platforminfo.length() == 0)
|
if (platforminfo.length() == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user