mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows: Fix various compiler warnings
This commit is contained in:
@@ -181,7 +181,7 @@ int ReadVolumeHeader (BOOL bBoot, char *encryptedHeader, Password *password, int
|
|||||||
#if !defined(_UEFI)
|
#if !defined(_UEFI)
|
||||||
TC_EVENT keyDerivationCompletedEvent;
|
TC_EVENT keyDerivationCompletedEvent;
|
||||||
TC_EVENT noOutstandingWorkItemEvent;
|
TC_EVENT noOutstandingWorkItemEvent;
|
||||||
KeyDerivationWorkItem *keyDerivationWorkItems;
|
KeyDerivationWorkItem *keyDerivationWorkItems = NULL;
|
||||||
KeyDerivationWorkItem *item;
|
KeyDerivationWorkItem *item;
|
||||||
size_t encryptionThreadCount = GetEncryptionThreadCount();
|
size_t encryptionThreadCount = GetEncryptionThreadCount();
|
||||||
LONG outstandingWorkItemCount = 0;
|
LONG outstandingWorkItemCount = 0;
|
||||||
@@ -589,8 +589,11 @@ ret:
|
|||||||
{
|
{
|
||||||
TC_WAIT_EVENT (noOutstandingWorkItemEvent);
|
TC_WAIT_EVENT (noOutstandingWorkItemEvent);
|
||||||
|
|
||||||
burn (keyDerivationWorkItems, sizeof (KeyDerivationWorkItem) * pkcs5PrfCount);
|
if (keyDerivationWorkItems)
|
||||||
TCfree (keyDerivationWorkItems);
|
{
|
||||||
|
burn (keyDerivationWorkItems, sizeof (KeyDerivationWorkItem) * pkcs5PrfCount);
|
||||||
|
TCfree (keyDerivationWorkItems);
|
||||||
|
}
|
||||||
|
|
||||||
#if !defined(DEVICE_DRIVER)
|
#if !defined(DEVICE_DRIVER)
|
||||||
CloseHandle (keyDerivationCompletedEvent);
|
CloseHandle (keyDerivationCompletedEvent);
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ NTSTATUS LoadBootArguments (BOOL bIsEfi)
|
|||||||
|
|
||||||
NTSTATUS DriveFilterAddDevice (PDRIVER_OBJECT driverObject, PDEVICE_OBJECT pdo)
|
NTSTATUS DriveFilterAddDevice (PDRIVER_OBJECT driverObject, PDEVICE_OBJECT pdo)
|
||||||
{
|
{
|
||||||
DriveFilterExtension *Extension;
|
DriveFilterExtension *Extension = NULL;
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
PDEVICE_OBJECT filterDeviceObject = NULL;
|
PDEVICE_OBJECT filterDeviceObject = NULL;
|
||||||
PDEVICE_OBJECT attachedDeviceObject;
|
PDEVICE_OBJECT attachedDeviceObject;
|
||||||
@@ -275,7 +275,7 @@ NTSTATUS DriveFilterAddDevice (PDRIVER_OBJECT driverObject, PDEVICE_OBJECT pdo)
|
|||||||
err:
|
err:
|
||||||
if (filterDeviceObject)
|
if (filterDeviceObject)
|
||||||
{
|
{
|
||||||
if (Extension->LowerDeviceObject)
|
if (Extension && Extension->LowerDeviceObject)
|
||||||
IoDetachDevice (Extension->LowerDeviceObject);
|
IoDetachDevice (Extension->LowerDeviceObject);
|
||||||
|
|
||||||
IoDeleteDevice (filterDeviceObject);
|
IoDeleteDevice (filterDeviceObject);
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
|
|
||||||
#include "TCdefs.h"
|
#include "TCdefs.h"
|
||||||
#include <ntddk.h>
|
#include <ntddk.h>
|
||||||
|
#include <initguid.h>
|
||||||
|
#include <Ntddstor.h>
|
||||||
#include "Crypto.h"
|
#include "Crypto.h"
|
||||||
#include "Fat.h"
|
#include "Fat.h"
|
||||||
#include "Tests.h"
|
#include "Tests.h"
|
||||||
|
|||||||
@@ -43,14 +43,14 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject,
|
|||||||
PWSTR pwszMountVolume,
|
PWSTR pwszMountVolume,
|
||||||
BOOL bRawDevice)
|
BOOL bRawDevice)
|
||||||
{
|
{
|
||||||
FILE_STANDARD_INFORMATION FileStandardInfo;
|
FILE_STANDARD_INFORMATION FileStandardInfo = {0};
|
||||||
FILE_BASIC_INFORMATION FileBasicInfo;
|
FILE_BASIC_INFORMATION FileBasicInfo;
|
||||||
OBJECT_ATTRIBUTES oaFileAttributes;
|
OBJECT_ATTRIBUTES oaFileAttributes;
|
||||||
UNICODE_STRING FullFileName;
|
UNICODE_STRING FullFileName;
|
||||||
IO_STATUS_BLOCK IoStatusBlock;
|
IO_STATUS_BLOCK IoStatusBlock;
|
||||||
PCRYPTO_INFO cryptoInfoPtr = NULL;
|
PCRYPTO_INFO cryptoInfoPtr = NULL;
|
||||||
PCRYPTO_INFO tmpCryptoInfo = NULL;
|
PCRYPTO_INFO tmpCryptoInfo = NULL;
|
||||||
LARGE_INTEGER lDiskLength;
|
LARGE_INTEGER lDiskLength = {0};
|
||||||
__int64 partitionStartingOffset = 0;
|
__int64 partitionStartingOffset = 0;
|
||||||
int volumeType;
|
int volumeType;
|
||||||
char *readBuffer = 0;
|
char *readBuffer = 0;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ uint32 HiddenSysLeakProtectionCount = 0;
|
|||||||
|
|
||||||
NTSTATUS VolumeFilterAddDevice (PDRIVER_OBJECT driverObject, PDEVICE_OBJECT pdo)
|
NTSTATUS VolumeFilterAddDevice (PDRIVER_OBJECT driverObject, PDEVICE_OBJECT pdo)
|
||||||
{
|
{
|
||||||
VolumeFilterExtension *Extension;
|
VolumeFilterExtension *Extension = NULL;
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
PDEVICE_OBJECT filterDeviceObject = NULL;
|
PDEVICE_OBJECT filterDeviceObject = NULL;
|
||||||
PDEVICE_OBJECT attachedDeviceObject;
|
PDEVICE_OBJECT attachedDeviceObject;
|
||||||
@@ -72,7 +72,7 @@ NTSTATUS VolumeFilterAddDevice (PDRIVER_OBJECT driverObject, PDEVICE_OBJECT pdo)
|
|||||||
err:
|
err:
|
||||||
if (filterDeviceObject)
|
if (filterDeviceObject)
|
||||||
{
|
{
|
||||||
if (Extension->LowerDeviceObject)
|
if (Extension && Extension->LowerDeviceObject)
|
||||||
IoDetachDevice (Extension->LowerDeviceObject);
|
IoDetachDevice (Extension->LowerDeviceObject);
|
||||||
|
|
||||||
IoDeleteDevice (filterDeviceObject);
|
IoDeleteDevice (filterDeviceObject);
|
||||||
|
|||||||
Reference in New Issue
Block a user