From 2e9d72a0be8579d6f1d3c74c64873a9c2f844272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Thu, 5 Jan 2023 20:29:27 +0100 Subject: [PATCH] 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. -- --- lang/cpp/src/gpgrevokekeyeditinteractor.cpp | 4 ++-- 1 file 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(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(nextLine) < reasonLines.size() ? state + 1 : REASON_TEXT_DONE; } } err = GENERAL_ERROR;