VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Common/EMVCard.cpp4
-rw-r--r--src/Core/Unix/CoreUnix.cpp5
-rw-r--r--src/Main/Forms/SecurityTokenKeyfilesDialog.cpp1
3 files changed, 3 insertions, 7 deletions
diff --git a/src/Common/EMVCard.cpp b/src/Common/EMVCard.cpp
index 5f694240..e96422b1 100644
--- a/src/Common/EMVCard.cpp
+++ b/src/Common/EMVCard.cpp
@@ -25,11 +25,11 @@ namespace VeraCrypt
#ifndef TC_WINDOWS
wstring ArrayToHexWideString(const unsigned char * pbData, size_t cbData)
{
- static wchar_t* hexChar = L"0123456789ABCDEF";
+ static const wchar_t* hexChar = L"0123456789ABCDEF";
wstring result;
if (pbData)
{
- for (int i = 0; i < cbData; i++)
+ for (size_t i = 0; i < cbData; i++)
{
result += hexChar[pbData[i] >> 4];
result += hexChar[pbData[i] & 0x0F];
diff --git a/src/Core/Unix/CoreUnix.cpp b/src/Core/Unix/CoreUnix.cpp
index 0b248fb9..258979b9 100644
--- a/src/Core/Unix/CoreUnix.cpp
+++ b/src/Core/Unix/CoreUnix.cpp
@@ -22,9 +22,6 @@
#include "Driver/Fuse/FuseService.h"
#include "Volume/VolumePasswordCache.h"
-template<typename T>
-inline void ignore_result(const T & /* unused result */) {}
-
namespace VeraCrypt
{
#ifdef TC_LINUX
@@ -694,7 +691,7 @@ namespace VeraCrypt
{
try
{
- ignore_result(chown (mountPoint.c_str(), GetRealUserId(), GetRealGroupId()));
+ throw_sys_sub_if (chown (mountPoint.c_str(), GetRealUserId(), GetRealGroupId()) == -1, mountPoint);
} catch (...) { }
}
}
diff --git a/src/Main/Forms/SecurityTokenKeyfilesDialog.cpp b/src/Main/Forms/SecurityTokenKeyfilesDialog.cpp
index d78e22fd..8f51cfa8 100644
--- a/src/Main/Forms/SecurityTokenKeyfilesDialog.cpp
+++ b/src/Main/Forms/SecurityTokenKeyfilesDialog.cpp
@@ -55,7 +55,6 @@ namespace VeraCrypt
SecurityTokenKeyfileListCtrl->DeleteAllItems();
SecurityTokenKeyfileList = Token::GetAvailableKeyfiles(Gui->GetPreferences().EMVSupportEnabled);
- size_t i = 0;
foreach (const shared_ptr<TokenKeyfile> key, SecurityTokenKeyfileList)
{
vector <wstring> fields (SecurityTokenKeyfileListCtrl->GetColumnCount());