From 2ce9519afcf46c44778b54a81aeed5ab6db3e7f9 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 4 Jan 2026 14:43:34 +0200 Subject: [PATCH] Avoid -Wsign-conversion warning in detail/sha1.hpp --- include/boost/uuid/detail/sha1.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/uuid/detail/sha1.hpp b/include/boost/uuid/detail/sha1.hpp index f1fab21..5ed63a5 100644 --- a/include/boost/uuid/detail/sha1.hpp +++ b/include/boost/uuid/detail/sha1.hpp @@ -122,10 +122,10 @@ inline void sha1::process_block() { unsigned int w[80]; for (std::size_t i=0; i<16; ++i) { - w[i] = (block_[i*4 + 0] << 24); - w[i] |= (block_[i*4 + 1] << 16); - w[i] |= (block_[i*4 + 2] << 8); - w[i] |= (block_[i*4 + 3]); + w[i] = static_cast(block_[i*4 + 0]) << 24; + w[i] |= static_cast(block_[i*4 + 1]) << 16; + w[i] |= static_cast(block_[i*4 + 2]) << 8; + w[i] |= static_cast(block_[i*4 + 3]); } for (std::size_t i=16; i<80; ++i) { w[i] = left_rotate((w[i-3] ^ w[i-8] ^ w[i-14] ^ w[i-16]), 1);