aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Klöcker <[email protected]>2023-01-05 19:29:27 +0000
committerIngo Klöcker <[email protected]>2023-01-05 19:29:27 +0000
commit2e9d72a0be8579d6f1d3c74c64873a9c2f844272 (patch)
treebea8a19f4ae0c212e74fc050f6d2fd0a918f1fef
parentcpp: Expliticly declare compiler generated copy constructors (diff)
downloadgpgme-2e9d72a0be8579d6f1d3c74c64873a9c2f844272.tar.gz
gpgme-2e9d72a0be8579d6f1d3c74c64873a9c2f844272.zip
cpp: Fix comparisons of integer expressions of different signedness
* lang/cpp/src/gpgrevokekeyeditinteractor.cpp (GpgRevokeKeyEditInteractor::Private::nextState): Cast signed nextLine value to std::size_t. --
-rw-r--r--lang/cpp/src/gpgrevokekeyeditinteractor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lang/cpp/src/gpgrevokekeyeditinteractor.cpp b/lang/cpp/src/gpgrevokekeyeditinteractor.cpp
index fda70f24..f918bdb6 100644
--- a/lang/cpp/src/gpgrevokekeyeditinteractor.cpp
+++ b/lang/cpp/src/gpgrevokekeyeditinteractor.cpp
@@ -138,7 +138,7 @@ unsigned int GpgRevokeKeyEditInteractor::Private::nextState(unsigned int status,
if (status == GPGME_STATUS_GET_LINE &&
strcmp(args, "ask_revocation_reason.text") == 0) {
nextLine++;
- return nextLine < reasonLines.size() ? REASON_TEXT : REASON_TEXT_DONE;
+ return static_cast<std::size_t>(nextLine) < reasonLines.size() ? REASON_TEXT : REASON_TEXT_DONE;
}
err = GENERAL_ERROR;
return ERROR;
@@ -147,7 +147,7 @@ unsigned int GpgRevokeKeyEditInteractor::Private::nextState(unsigned int status,
if (status == GPGME_STATUS_GET_LINE &&
strcmp(args, "ask_revocation_reason.text") == 0) {
nextLine++;
- return nextLine < reasonLines.size() ? state + 1 : REASON_TEXT_DONE;
+ return static_cast<std::size_t>(nextLine) < reasonLines.size() ? state + 1 : REASON_TEXT_DONE;
}
}
err = GENERAL_ERROR;