aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/function/gpg/GpgKeyManager.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-12-03 09:42:14 +0000
committersaturneric <[email protected]>2024-12-03 09:42:14 +0000
commitf4525ea80237bbb57ab7e3ab196fb3e85a4b05bb (patch)
treef0dc58c1e4740f79640fbdadcbf68563ec59b9df /src/core/function/gpg/GpgKeyManager.cpp
parentfix: variable 'mods_path' is reassigned a value before the old one has been u... (diff)
downloadGpgFrontend-f4525ea80237bbb57ab7e3ab196fb3e85a4b05bb.tar.gz
GpgFrontend-f4525ea80237bbb57ab7e3ab196fb3e85a4b05bb.zip
fix: compiler warnings
Diffstat (limited to '')
-rw-r--r--src/core/function/gpg/GpgKeyManager.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/function/gpg/GpgKeyManager.cpp b/src/core/function/gpg/GpgKeyManager.cpp
index 630b2b0c..d0576e59 100644
--- a/src/core/function/gpg/GpgKeyManager.cpp
+++ b/src/core/function/gpg/GpgKeyManager.cpp
@@ -173,7 +173,8 @@ auto GpgKeyManager::SetOwnerTrustLevel(const GpgKey& key,
}
auto GpgKeyManager::DeleteSubkey(const GpgKey& key, int subkey_index) -> bool {
- if (subkey_index < 0 || subkey_index >= key.GetSubKeys()->size()) {
+ if (subkey_index < 0 ||
+ subkey_index >= static_cast<int>(key.GetSubKeys()->size())) {
LOG_W() << "illegal subkey index: " << subkey_index;
return false;
}
@@ -258,7 +259,8 @@ auto GpgKeyManager::DeleteSubkey(const GpgKey& key, int subkey_index) -> bool {
auto GpgKeyManager::RevokeSubkey(const GpgKey& key, int subkey_index,
int reason_code,
const QString& reason_text) -> bool {
- if (subkey_index < 0 || subkey_index >= key.GetSubKeys()->size()) {
+ if (subkey_index < 0 ||
+ subkey_index >= static_cast<int>(key.GetSubKeys()->size())) {
LOG_W() << "illegal subkey index: " << subkey_index;
return false;
}