From 64f9db8db6491ea7fe510b2ea4ef6d71e65ddd1a Mon Sep 17 00:00:00 2001 From: Rene Meusel Date: Tue, 23 Apr 2024 09:52:04 +0200 Subject: [PATCH] WIP - fix compiler warning --- src/lib/pubkey/kyber/kyber_common/kyber_algos.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/pubkey/kyber/kyber_common/kyber_algos.cpp b/src/lib/pubkey/kyber/kyber_common/kyber_algos.cpp index 70865090de2..8000a438a53 100644 --- a/src/lib/pubkey/kyber/kyber_common/kyber_algos.cpp +++ b/src/lib/pubkey/kyber/kyber_common/kyber_algos.cpp @@ -49,8 +49,8 @@ void kyber_sample_ntt_uniform(KyberPolyNTT& p, XOF& xof) { std::array buf = {0}; xof.output(std::span{buf}.first<3>()); const auto x = load_le(buf); - const auto d1 = static_cast(x) & 0x0FFF; - const auto d2 = static_cast(x >> 12); + const uint16_t d1 = static_cast(x) & 0x0FFF; + const uint16_t d2 = static_cast(x >> 12); if(d1 < KyberConstants::Q) { p[count++] = d1;