Skip to content

Commit 011a66d

Browse files
committed
Clear sign compare warning
1 parent 3d29f99 commit 011a66d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cham.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ void CHAM64::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
133133
GetBlock<word16, BigEndian> iblock(inBlock);
134134
iblock(m_x[0])(m_x[1])(m_x[2])(m_x[3]);
135135

136-
const unsigned int R = 80;
136+
const int R = 80;
137137
for (int i = 0; i < R; i+=16)
138138
{
139139
CHAM_EncRound< 0, 16>(m_x.begin(), m_rk.begin(), i+0);
@@ -164,7 +164,7 @@ void CHAM64::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
164164
GetBlock<word16, BigEndian> iblock(inBlock);
165165
iblock(m_x[0])(m_x[1])(m_x[2])(m_x[3]);
166166

167-
const unsigned int R = 80;
167+
const int R = 80;
168168
for (int i = R-1; i >=0 ; i-=16)
169169
{
170170
CHAM_DecRound<15, 16>(m_x.begin(), m_rk.begin(), i-0);
@@ -214,7 +214,7 @@ void CHAM128::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
214214
{
215215
case 4: // 128-bit key
216216
{
217-
const unsigned int R = 80;
217+
const int R = 80;
218218
for (int i = 0; i < R; i+=8)
219219
{
220220
CHAM_EncRound<0, 8>(m_x.begin(), m_rk.begin(), i+0);
@@ -230,7 +230,7 @@ void CHAM128::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
230230
}
231231
case 8: // 256-bit key
232232
{
233-
const unsigned int R = 96;
233+
const int R = 96;
234234
for (int i = 0; i < R; i+=16)
235235
{
236236
CHAM_EncRound< 0, 16>(m_x.begin(), m_rk.begin(), i+0);
@@ -270,7 +270,7 @@ void CHAM128::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
270270
{
271271
case 4: // 128-bit key
272272
{
273-
const unsigned int R = 80;
273+
const int R = 80;
274274
for (int i = R-1; i >= 0; i-=8)
275275
{
276276
CHAM_DecRound<7, 8>(m_x.begin(), m_rk.begin(), i-0);
@@ -286,7 +286,7 @@ void CHAM128::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
286286
}
287287
case 8: // 256-bit key
288288
{
289-
const unsigned int R = 96;
289+
const int R = 96;
290290
for (int i = R-1; i >= 0; i-=16)
291291
{
292292
CHAM_DecRound<15, 16>(m_x.begin(), m_rk.begin(), i-0);

0 commit comments

Comments
 (0)