Switch to size_t for loop control

pull/548/head
Jeffrey Walton 2017-11-21 04:55:41 -05:00
parent 78922e9c85
commit 5007c13fbd
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ inline void SPECK_Encrypt(W c[2], const W p[2], const W k[R])
c[0]=p[0]; c[1]=p[1];
// Don't unroll this loop. Things slow down.
for(W i=0; static_cast<int>(i)<R; ++i)
for (size_t i=0; static_cast<int>(i)<R; ++i)
TF83(c[0], c[1], k[i]);
}
@ -73,7 +73,7 @@ inline void SPECK_Decrypt(W p[2], const W c[2], const W k[R])
p[0]=c[0]; p[1]=c[1];
// Don't unroll this loop. Things slow down.
for(W i=R-1; static_cast<int>(i)>=0; --i)
for (size_t i=R-1; static_cast<int>(i)>=0; --i)
TR83(p[0], p[1], k[i]);
}