VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2020-06-26 01:11:55 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2020-06-26 01:22:03 +0200
commit53070f8bb58e04f28d7e26ff7ddbac9307d01c96 (patch)
tree4634d5be4e5c103cb10b3e0d8dd6489bf84f409c /src/Main
parent9a890ec2fc10e5bef4e2d3b9800186ec1673cde1 (diff)
downloadVeraCrypt-53070f8bb58e04f28d7e26ff7ddbac9307d01c96.tar.gz
VeraCrypt-53070f8bb58e04f28d7e26ff7ddbac9307d01c96.zip
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
Diffstat (limited to 'src/Main')
-rw-r--r--src/Main/UserPreferences.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Main/UserPreferences.cpp b/src/Main/UserPreferences.cpp
index e4cc4943..db54b4a4 100644
--- a/src/Main/UserPreferences.cpp
+++ b/src/Main/UserPreferences.cpp
@@ -21,7 +21,7 @@ namespace VeraCrypt
{
if (cfgText == L"0")
cfgVar = false;
- else if (cfgText == L"1")
+ else
cfgVar = true;
}
@@ -93,7 +93,7 @@ namespace VeraCrypt
TC_CONFIG_SET (MountDevicesOnLogon);
TC_CONFIG_SET (MountFavoritesOnLogon);
- bool readOnly;
+ bool readOnly = false;
SetValue (configMap[L"MountVolumesReadOnly"], readOnly);
DefaultMountOptions.Protection = readOnly ? VolumeProtection::ReadOnly : VolumeProtection::None;