Skip to content

Commit 8300458

Browse files
committed
Fix [-Wchar-subscripts] in Hash extension
Use size_t type instead of char for string index. Char may be unsigned on some platforms. partial fix to bug 79431
1 parent 446724b commit 8300458

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/hash/hash_sha3.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ static inline uint64_t load64(const unsigned char* x) {
4949
return ret;
5050
}
5151
static inline void store64(unsigned char* x, uint64_t val) {
52-
char i;
52+
size_t i;
5353
for (i = 0; i < 8; ++i) {
5454
x[i] = val & 0xFF;
5555
val >>= 8;
5656
}
5757
}
5858
static inline void xor64(unsigned char* x, uint64_t val) {
59-
char i;
59+
size_t i;
6060
for (i = 0; i < 8; ++i) {
6161
x[i] ^= val & 0xFF;
6262
val >>= 8;

0 commit comments

Comments
 (0)