VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2021-01-01 23:59:37 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2021-01-02 01:16:40 +0100
commit3281b276b65912f0a6c265fb6f150f815b528937 (patch)
treea54de65af0d1a67b60b41378b362b2cfb93952ea /src/Driver
parent9881744c95737264c7cd9f13b3c70042c03584aa (diff)
downloadVeraCrypt-3281b276b65912f0a6c265fb6f150f815b528937.tar.gz
VeraCrypt-3281b276b65912f0a6c265fb6f150f815b528937.zip
Windows: Fix various warnings
Diffstat (limited to 'src/Driver')
-rw-r--r--src/Driver/DriveFilter.c2
-rw-r--r--src/Driver/EncryptedIoQueue.c2
-rw-r--r--src/Driver/Ntvol.c6
3 files changed, 5 insertions, 5 deletions
diff --git a/src/Driver/DriveFilter.c b/src/Driver/DriveFilter.c
index dc836ebe..740ce949 100644
--- a/src/Driver/DriveFilter.c
+++ b/src/Driver/DriveFilter.c
@@ -362,7 +362,7 @@ static void ComputeBootLoaderFingerprint(PDEVICE_OBJECT LowerDeviceObject, byte*
NTSTATUS saveStatus = STATUS_INVALID_PARAMETER;
#ifdef _WIN64
XSTATE_SAVE SaveState;
- if (g_isIntel && HasSAVX())
+ if (IsCpuIntel() && HasSAVX())
saveStatus = KeSaveExtendedProcessorStateVC(XSTATE_MASK_GSSE, &SaveState);
#else
KFLOATING_SAVE floatingPointState;
diff --git a/src/Driver/EncryptedIoQueue.c b/src/Driver/EncryptedIoQueue.c
index 6f1d3777..85b9a330 100644
--- a/src/Driver/EncryptedIoQueue.c
+++ b/src/Driver/EncryptedIoQueue.c
@@ -398,7 +398,7 @@ static VOID IoThreadProc (PVOID threadArg)
for (subFragment = 0 ; subFragment < 3; ++subFragment)
{
LARGE_INTEGER subFragmentOffset;
- ULONG subFragmentLength;
+ ULONG subFragmentLength = 0;
subFragmentOffset.QuadPart = request->Offset.QuadPart;
switch (subFragment)
diff --git a/src/Driver/Ntvol.c b/src/Driver/Ntvol.c
index 747fc026..45a07cdb 100644
--- a/src/Driver/Ntvol.c
+++ b/src/Driver/Ntvol.c
@@ -43,14 +43,14 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject,
PWSTR pwszMountVolume,
BOOL bRawDevice)
{
- FILE_STANDARD_INFORMATION FileStandardInfo = {0};
+ FILE_STANDARD_INFORMATION FileStandardInfo = { 0 };
FILE_BASIC_INFORMATION FileBasicInfo;
OBJECT_ATTRIBUTES oaFileAttributes;
UNICODE_STRING FullFileName;
IO_STATUS_BLOCK IoStatusBlock;
PCRYPTO_INFO cryptoInfoPtr = NULL;
PCRYPTO_INFO tmpCryptoInfo = NULL;
- LARGE_INTEGER lDiskLength = {0};
+ LARGE_INTEGER lDiskLength = { 0 };
__int64 partitionStartingOffset = 0;
int volumeType;
char *readBuffer = 0;
@@ -484,7 +484,7 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject,
// Header of a volume that is not within the scope of system encryption, or
// header of a system hidden volume (containing a hidden OS)
- LARGE_INTEGER headerOffset;
+ LARGE_INTEGER headerOffset = {0};
if (mount->UseBackupHeader && lDiskLength.QuadPart <= TC_TOTAL_VOLUME_HEADERS_SIZE)
continue;