mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Linux: Solve compilation warning (unused variables, pointer cast)
This commit is contained in:
@@ -401,7 +401,7 @@ typedef struct hmac_ripemd160_ctx_struct
|
|||||||
void hmac_ripemd160_internal (char *key, int keylen, char *input_digest, int len, hmac_ripemd160_ctx* hmac)
|
void hmac_ripemd160_internal (char *key, int keylen, char *input_digest, int len, hmac_ripemd160_ctx* hmac)
|
||||||
{
|
{
|
||||||
RMD160_CTX* context = &(hmac->context);
|
RMD160_CTX* context = &(hmac->context);
|
||||||
unsigned char* k_pad = hmac->k_pad; /* inner/outer padding - key XORd with ipad */
|
unsigned char* k_pad = (unsigned char*) hmac->k_pad; /* inner/outer padding - key XORd with ipad */
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1392,19 +1392,16 @@ namespace VeraCrypt
|
|||||||
File backupFile;
|
File backupFile;
|
||||||
backupFile.Open (*files.front(), File::OpenRead);
|
backupFile.Open (*files.front(), File::OpenRead);
|
||||||
|
|
||||||
uint64 headerSize;
|
|
||||||
bool legacyBackup;
|
bool legacyBackup;
|
||||||
|
|
||||||
// Determine the format of the backup file
|
// Determine the format of the backup file
|
||||||
switch (backupFile.Length())
|
switch (backupFile.Length())
|
||||||
{
|
{
|
||||||
case TC_VOLUME_HEADER_GROUP_SIZE:
|
case TC_VOLUME_HEADER_GROUP_SIZE:
|
||||||
headerSize = TC_VOLUME_HEADER_SIZE;
|
|
||||||
legacyBackup = false;
|
legacyBackup = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TC_VOLUME_HEADER_SIZE_LEGACY * 2:
|
case TC_VOLUME_HEADER_SIZE_LEGACY * 2:
|
||||||
headerSize = TC_VOLUME_HEADER_SIZE_LEGACY;
|
|
||||||
legacyBackup = true;
|
legacyBackup = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -1470,19 +1470,16 @@ namespace VeraCrypt
|
|||||||
File backupFile;
|
File backupFile;
|
||||||
backupFile.Open (filePath, File::OpenRead);
|
backupFile.Open (filePath, File::OpenRead);
|
||||||
|
|
||||||
uint64 headerSize;
|
|
||||||
bool legacyBackup;
|
bool legacyBackup;
|
||||||
|
|
||||||
// Determine the format of the backup file
|
// Determine the format of the backup file
|
||||||
switch (backupFile.Length())
|
switch (backupFile.Length())
|
||||||
{
|
{
|
||||||
case TC_VOLUME_HEADER_GROUP_SIZE:
|
case TC_VOLUME_HEADER_GROUP_SIZE:
|
||||||
headerSize = TC_VOLUME_HEADER_SIZE;
|
|
||||||
legacyBackup = false;
|
legacyBackup = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TC_VOLUME_HEADER_SIZE_LEGACY * 2:
|
case TC_VOLUME_HEADER_SIZE_LEGACY * 2:
|
||||||
headerSize = TC_VOLUME_HEADER_SIZE_LEGACY;
|
|
||||||
legacyBackup = true;
|
legacyBackup = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -119,9 +119,6 @@ namespace VeraCrypt
|
|||||||
bool skipLayoutV1Normal = false;
|
bool skipLayoutV1Normal = false;
|
||||||
|
|
||||||
bool deviceHosted = GetPath().IsDevice();
|
bool deviceHosted = GetPath().IsDevice();
|
||||||
size_t hostDeviceSectorSize = 0;
|
|
||||||
if (deviceHosted)
|
|
||||||
hostDeviceSectorSize = volumeFile->GetDeviceSectorSize();
|
|
||||||
|
|
||||||
// Test volume layouts
|
// Test volume layouts
|
||||||
foreach (shared_ptr <VolumeLayout> layout, VolumeLayout::GetAvailableLayouts (volumeType))
|
foreach (shared_ptr <VolumeLayout> layout, VolumeLayout::GetAvailableLayouts (volumeType))
|
||||||
|
|||||||
Reference in New Issue
Block a user