From 36645019c236450262f8c36d11e78701b7b1da72 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Fri, 13 Aug 2021 00:08:46 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20Fix=20compiler=20warning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/codec.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/codec.cpp b/Source/codec.cpp index c175a7943..a66ce33d4 100644 --- a/Source/codec.cpp +++ b/Source/codec.cpp @@ -79,7 +79,7 @@ std::size_t codec_decode(byte *pbSrcDst, std::size_t size, const char *pszPasswo for (auto i = size; i != 0; pbSrcDst += BlockSize, i -= BlockSize) { memcpy(buf, pbSrcDst, BlockSize); SHA1Result(0, dst); - for (int j = 0; j < BlockSize; j++) { + for (unsigned j = 0; j < BlockSize; j++) { buf[j] ^= dst[j % SHA1HashSize]; } SHA1Calculate(0, buf, nullptr); @@ -132,7 +132,7 @@ void codec_encode(byte *pbSrcDst, std::size_t size, std::size_t size64, const ch memset(buf + chunk, 0, BlockSize - chunk); SHA1Result(0, dst); SHA1Calculate(0, buf, nullptr); - for (int j = 0; j < BlockSize; j++) { + for (unsigned j = 0; j < BlockSize; j++) { buf[j] ^= dst[j % SHA1HashSize]; } memset(dst, 0, sizeof(dst));