Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Commit

Permalink
Fix compilation issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
floitsch committed Sep 21, 2023
1 parent b50d899 commit 05704cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/hmac256-internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void hmac_sha256_final(struct hmac_sha256_ctx *ctx, uint8_t *mac,
// we need to pad the "ctx_inside" state because `sha256_compress` expects a padded input
uint64_t bit_len = __builtin_bswap64(SHA256_DIGEST_SIZE * 8 + 512);
block[SHA256_DIGEST_SIZE] = 0x80;
bzero(block + SHA256_DIGEST_SIZE + 1, SHA256_BLOCK_SIZE - SHA256_DIGEST_SIZE - 1);
memset(block + SHA256_DIGEST_SIZE + 1, 0, SHA256_BLOCK_SIZE - SHA256_DIGEST_SIZE - 1);
memcpy(block + SHA256_BLOCK_SIZE - sizeof(bit_len), &bit_len, sizeof(bit_len));

sha256_compress(&ctx->ctx_outside, block);
Expand Down
1 change: 1 addition & 0 deletions util/async.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ int aio_bh_poll(AioContext *ctx)

/* Synchronizes with QSLIST_INSERT_HEAD_ATOMIC in aio_bh_enqueue(). */
QSLIST_MOVE_ATOMIC(&slice.bh_list, &ctx->bh_list);
#pragma GCC diagnostic warning "-Wdangling-pointer"
QSIMPLEQ_INSERT_TAIL(&ctx->bh_slice_list, &slice, next);

while ((s = QSIMPLEQ_FIRST(&ctx->bh_slice_list))) {
Expand Down

0 comments on commit 05704cd

Please sign in to comment.