libxcrypt/libxcrypt-4.4.22-fix_Werror_conversion__test_des_obsolete_c.patch

23 lines
724 B
Diff

From ab819b18673ddce6d9ded84e412cff6b26e394fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Sun, 13 Jun 2021 12:24:23 +0200
Subject: [PATCH] test/des-obsolete.c: Fix Werror=conversion.
---
test/des-obsolete.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/des-obsolete.c b/test/des-obsolete.c
index 2955c873..2259e815 100644
--- a/test/des-obsolete.c
+++ b/test/des-obsolete.c
@@ -29,7 +29,7 @@ expand (unsigned char ex[64], const unsigned char pk[8])
{
t = pk[i];
for (j = 0; j < 8; j++)
- ex[i*8 + j] = (t & (0x01u << (7 - j))) != 0;
+ ex[i*8 + j] = (unsigned char)((t & (0x01u << (7 - j))) != 0);
}
}