mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-01-04 04:38:12 -06:00
Linux/MacOSX: fix warning reported by static code analysis tool about possible undefined output value in UserPreferences::SetValue and missing initialization of member variables in File constructor
This commit is contained in:
@@ -21,7 +21,7 @@ namespace VeraCrypt
|
|||||||
{
|
{
|
||||||
if (cfgText == L"0")
|
if (cfgText == L"0")
|
||||||
cfgVar = false;
|
cfgVar = false;
|
||||||
else if (cfgText == L"1")
|
else
|
||||||
cfgVar = true;
|
cfgVar = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ namespace VeraCrypt
|
|||||||
TC_CONFIG_SET (MountDevicesOnLogon);
|
TC_CONFIG_SET (MountDevicesOnLogon);
|
||||||
TC_CONFIG_SET (MountFavoritesOnLogon);
|
TC_CONFIG_SET (MountFavoritesOnLogon);
|
||||||
|
|
||||||
bool readOnly;
|
bool readOnly = false;
|
||||||
SetValue (configMap[L"MountVolumesReadOnly"], readOnly);
|
SetValue (configMap[L"MountVolumesReadOnly"], readOnly);
|
||||||
DefaultMountOptions.Protection = readOnly ? VolumeProtection::ReadOnly : VolumeProtection::None;
|
DefaultMountOptions.Protection = readOnly ? VolumeProtection::ReadOnly : VolumeProtection::None;
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,11 @@ namespace VeraCrypt
|
|||||||
typedef int SystemFileHandleType;
|
typedef int SystemFileHandleType;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
File () : FileIsOpen (false), SharedHandle (false) { }
|
File () : FileIsOpen (false), mFileOpenFlags (FlagsNone), SharedHandle (false), FileHandle (0)
|
||||||
|
#ifndef TC_WINDOWS
|
||||||
|
,AccTime(0), ModTime (0)
|
||||||
|
#endif
|
||||||
|
{ }
|
||||||
virtual ~File ();
|
virtual ~File ();
|
||||||
|
|
||||||
void AssignSystemHandle (SystemFileHandleType openFileHandle, bool sharedHandle = true)
|
void AssignSystemHandle (SystemFileHandleType openFileHandle, bool sharedHandle = true)
|
||||||
|
|||||||
Reference in New Issue
Block a user