Pedro Monreal Gonzalez
b6840238b3
gpgme 1.16.0 OBS-URL: https://build.opensuse.org/request/show/904757 OBS-URL: https://build.opensuse.org/package/show/Base:System/gpgme?expand=0&rev=132
34 lines
1.3 KiB
Diff
34 lines
1.3 KiB
Diff
From 6a79e90dedc19877ae1c520fed875b57089a5425 Mon Sep 17 00:00:00 2001
|
|
From: =?utf8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
|
|
Date: Thu, 8 Jul 2021 11:54:06 +0200
|
|
Subject: [PATCH] Make sure expiration time is interpreted as unsigned number
|
|
|
|
* lang/qt/tests/t-various.cpp (testSignKeyWithExpiration): Convert
|
|
expiration time to uint_least32_t.
|
|
--
|
|
|
|
This fixes the test on 32-bit systems where time_t (the return type of
|
|
expirationTime()) is a signed 32-bit integer type.
|
|
|
|
GnuPG-bug-id: 5522
|
|
---
|
|
lang/qt/tests/t-various.cpp | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/lang/qt/tests/t-various.cpp b/lang/qt/tests/t-various.cpp
|
|
index 8563b681..72a2487a 100644
|
|
--- a/lang/qt/tests/t-various.cpp
|
|
+++ b/lang/qt/tests/t-various.cpp
|
|
@@ -355,7 +355,7 @@ private Q_SLOTS:
|
|
target.update();
|
|
const auto keySignature = target.userID(0).signature(target.userID(0).numSignatures() - 1);
|
|
QVERIFY(!keySignature.neverExpires());
|
|
- const auto expirationDate = QDateTime::fromSecsSinceEpoch(keySignature.expirationTime()).date();
|
|
+ const auto expirationDate = QDateTime::fromSecsSinceEpoch(uint_least32_t(keySignature.expirationTime())).date();
|
|
QCOMPARE(expirationDate, QDate(2106, 2, 6)); // expiration date is capped at 2106-02-06
|
|
}
|
|
|
|
--
|
|
2.11.0
|
|
|