Merge pull request #2743 from cesanta/warn

Squash warning
This commit is contained in:
Sergio R. Caprile 2024-05-07 17:08:07 -03:00 committed by GitHub
commit 3168a2aca0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 16 deletions

View File

@ -7056,14 +7056,14 @@ void mg_sha256_final(unsigned char digest[32], mg_sha256_ctx *ctx) {
mg_sha256_chunk(ctx);
for (i = 0; i < 4; ++i) {
digest[i] = (ctx->state[0] >> (24 - i * 8)) & 0xff;
digest[i + 4] = (ctx->state[1] >> (24 - i * 8)) & 0xff;
digest[i + 8] = (ctx->state[2] >> (24 - i * 8)) & 0xff;
digest[i + 12] = (ctx->state[3] >> (24 - i * 8)) & 0xff;
digest[i + 16] = (ctx->state[4] >> (24 - i * 8)) & 0xff;
digest[i + 20] = (ctx->state[5] >> (24 - i * 8)) & 0xff;
digest[i + 24] = (ctx->state[6] >> (24 - i * 8)) & 0xff;
digest[i + 28] = (ctx->state[7] >> (24 - i * 8)) & 0xff;
digest[i] = (uint8_t) ((ctx->state[0] >> (24 - i * 8)) & 0xff);
digest[i + 4] = (uint8_t) ((ctx->state[1] >> (24 - i * 8)) & 0xff);
digest[i + 8] = (uint8_t) ((ctx->state[2] >> (24 - i * 8)) & 0xff);
digest[i + 12] = (uint8_t) ((ctx->state[3] >> (24 - i * 8)) & 0xff);
digest[i + 16] = (uint8_t) ((ctx->state[4] >> (24 - i * 8)) & 0xff);
digest[i + 20] = (uint8_t) ((ctx->state[5] >> (24 - i * 8)) & 0xff);
digest[i + 24] = (uint8_t) ((ctx->state[6] >> (24 - i * 8)) & 0xff);
digest[i + 28] = (uint8_t) ((ctx->state[7] >> (24 - i * 8)) & 0xff);
}
}

View File

@ -126,14 +126,14 @@ void mg_sha256_final(unsigned char digest[32], mg_sha256_ctx *ctx) {
mg_sha256_chunk(ctx);
for (i = 0; i < 4; ++i) {
digest[i] = (ctx->state[0] >> (24 - i * 8)) & 0xff;
digest[i + 4] = (ctx->state[1] >> (24 - i * 8)) & 0xff;
digest[i + 8] = (ctx->state[2] >> (24 - i * 8)) & 0xff;
digest[i + 12] = (ctx->state[3] >> (24 - i * 8)) & 0xff;
digest[i + 16] = (ctx->state[4] >> (24 - i * 8)) & 0xff;
digest[i + 20] = (ctx->state[5] >> (24 - i * 8)) & 0xff;
digest[i + 24] = (ctx->state[6] >> (24 - i * 8)) & 0xff;
digest[i + 28] = (ctx->state[7] >> (24 - i * 8)) & 0xff;
digest[i] = (uint8_t) ((ctx->state[0] >> (24 - i * 8)) & 0xff);
digest[i + 4] = (uint8_t) ((ctx->state[1] >> (24 - i * 8)) & 0xff);
digest[i + 8] = (uint8_t) ((ctx->state[2] >> (24 - i * 8)) & 0xff);
digest[i + 12] = (uint8_t) ((ctx->state[3] >> (24 - i * 8)) & 0xff);
digest[i + 16] = (uint8_t) ((ctx->state[4] >> (24 - i * 8)) & 0xff);
digest[i + 20] = (uint8_t) ((ctx->state[5] >> (24 - i * 8)) & 0xff);
digest[i + 24] = (uint8_t) ((ctx->state[6] >> (24 - i * 8)) & 0xff);
digest[i + 28] = (uint8_t) ((ctx->state[7] >> (24 - i * 8)) & 0xff);
}
}