1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 19:08:26 -06:00

Static Code Analysis : Correctly initialize member variables in various constructors

This commit is contained in:
Mounir IDRASSI
2014-07-09 02:01:57 +02:00
parent 9bb962c8bb
commit f19cfb3361
4 changed files with 14 additions and 6 deletions

View File

@@ -69,7 +69,7 @@ namespace VeraCrypt
struct SecurityTokenKeyfile
{
SecurityTokenKeyfile () { }
SecurityTokenKeyfile () : Handle(CK_INVALID_HANDLE), SlotId(CK_UNAVAILABLE_INFORMATION) { Token.SlotId = CK_UNAVAILABLE_INFORMATION; Token.Flags = 0; }
SecurityTokenKeyfile (const SecurityTokenKeyfilePath &path);
operator SecurityTokenKeyfilePath () const;
@@ -85,7 +85,8 @@ namespace VeraCrypt
{
Pkcs11Exception (CK_RV errorCode = (CK_RV) -1)
: ErrorCode (errorCode),
SubjectErrorCodeValid (false)
SubjectErrorCodeValid (false),
SubjectErrorCode( (uint64) -1)
{
}
@@ -155,7 +156,7 @@ namespace VeraCrypt
struct Pkcs11Session
{
Pkcs11Session () : UserLoggedIn (false) { }
Pkcs11Session () : Handle (CK_UNAVAILABLE_INFORMATION), UserLoggedIn (false) { }
CK_SESSION_HANDLE Handle;
bool UserLoggedIn;