pgbackrest.git / summary / log / commit / refs
commit df1491ef0f7ef962491e614ecca1f162ee022e7f
Author: David Steele <david@pgbackrest.org>
Date: Tue Aug 18 14:53:28 2026 +0000
Fix conversions in tests that clang reports as errors.
cipherBlock->mode is an enum of StringId values so compare it as unsigned, as the test two lines above already does for cipherSpecType(). Declare invalidLinkType as the enum it is assigned to rather than int, which keeps it an invalid value for that enum while no longer changing signedness.
test/src/module/common/cryptoTest.c | 2 +-
test/src/module/storage/posixTest.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/src/module/common/cryptoTest.c b/test/src/module/common/cryptoTest.c
index 400060249..d3d42e142 100644
--- a/test/src/module/common/cryptoTest.c
+++ b/test/src/module/common/cryptoTest.c
@@ -109,7 +109,7 @@ testRun(void)
TEST_RESULT_STR_Z(strNewBuf(cipherSpecPass(cipherSpecUnpack)), TEST_PASS, "unpack pass");
CipherBlock *cipherBlock = (CipherBlock *)ioFilterDriver(cipherBlockNewP(cipherModeEncrypt, cipherSpec));
- TEST_RESULT_INT(cipherBlock->mode, cipherModeEncrypt, "mode is valid");
+ TEST_RESULT_UINT(cipherBlock->mode, cipherModeEncrypt, "mode is valid");
TEST_RESULT_UINT(bufSize(cipherBlock->pass), strlen(TEST_PASS), "passphrase size is valid");
TEST_RESULT_BOOL(memcmp(bufPtrConst(cipherBlock->pass), TEST_PASS, strlen(TEST_PASS)) == 0, true, "passphrase is valid");
TEST_RESULT_BOOL(cipherBlock->saltDone, false, "salt done is false");
diff --git a/test/src/module/storage/posixTest.c b/test/src/module/storage/posixTest.c
index 3777a98ac..3de8f939b 100644
--- a/test/src/module/storage/posixTest.c
+++ b/test/src/module/storage/posixTest.c
@@ -891,7 +891,7 @@ testRun(void)
StorageInfo info = {0};
const String *backupLabel = STRDEF("20181119-152138F");
const String *latestLabel = STRDEF("latest");
- int invalidLinkType = 9;
+ StorageLinkType invalidLinkType = 9;
// -------------------------------------------------------------------------------------------------------------------------
TEST_TITLE("soft link success/fail");
[parent: d9e5e14e93f4]