From 71713bcdb52defa6542dcabedaf3ae34383fdec4 Mon Sep 17 00:00:00 2001 From: Alexey Lapshin Date: Wed, 12 Jul 2023 14:07:25 +0400 Subject: [PATCH] fix(mbedtls): fix gcc 13.1.0 warnings --- components/mbedtls/port/aes/dma/esp_aes.c | 2 +- components/mbedtls/port/sha/dma/sha.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/mbedtls/port/aes/dma/esp_aes.c b/components/mbedtls/port/aes/dma/esp_aes.c index 8969805698..c24fcbc510 100644 --- a/components/mbedtls/port/aes/dma/esp_aes.c +++ b/components/mbedtls/port/aes/dma/esp_aes.c @@ -333,7 +333,7 @@ static int esp_aes_process_dma(esp_aes_context *ctx, const unsigned char *input, lldesc_t *in_desc_head = NULL, *out_desc_head = NULL; lldesc_t *out_desc_tail = NULL; /* pointer to the final output descriptor */ lldesc_t *block_desc = NULL, *block_in_desc = NULL, *block_out_desc = NULL; - size_t lldesc_num; + size_t lldesc_num = 0; unsigned stream_bytes = len % AES_BLOCK_BYTES; // bytes which aren't in a full block unsigned block_bytes = len - stream_bytes; // bytes which are in a full block unsigned blocks = (block_bytes / AES_BLOCK_BYTES) + ((stream_bytes > 0) ? 1 : 0); diff --git a/components/mbedtls/port/sha/dma/sha.c b/components/mbedtls/port/sha/dma/sha.c index f0638ed3cf..26d0612589 100644 --- a/components/mbedtls/port/sha/dma/sha.c +++ b/components/mbedtls/port/sha/dma/sha.c @@ -251,7 +251,7 @@ static esp_err_t esp_sha_dma_process(esp_sha_type sha_type, const void *input, u const void *buf, uint32_t buf_len, bool is_first_block) { int ret = 0; - lldesc_t *dma_descr_head; + lldesc_t *dma_descr_head = NULL; size_t num_blks = (ilen + buf_len) / block_length(sha_type); memset(&s_dma_descr_input, 0, sizeof(lldesc_t));