mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 11:03:11 +00:00
Merge branch 'fix/components_for_static_analyzer_v6.0' into 'release/v6.0'
fix(ci): check all components using static analyzer (v6.0) See merge request espressif/esp-idf!45939
This commit is contained in:
@@ -25,6 +25,7 @@ gcc_static_analyzer:
|
||||
ANALYZING_APP: "examples/get-started/hello_world"
|
||||
script:
|
||||
- echo "CONFIG_COMPILER_STATIC_ANALYZER=y" >> ${ANALYZING_APP}/sdkconfig.defaults
|
||||
- sed -i 's/.*MINIMAL_BUILD.*//g' ${ANALYZING_APP}/CMakeLists.txt
|
||||
- idf-build-apps build -p ${ANALYZING_APP}
|
||||
|
||||
#
|
||||
|
||||
@@ -813,6 +813,7 @@ static void SPI_MASTER_ISR_ATTR spi_format_hal_trans_struct(spi_device_t *dev, s
|
||||
// Setup the transaction-specified registers and linked-list used by the DMA (or FIFO if DMA is not used)
|
||||
static void SPI_MASTER_ISR_ATTR spi_new_trans(spi_device_t *dev, spi_trans_priv_t *trans_buf)
|
||||
{
|
||||
assert(dev != NULL);
|
||||
spi_host_t *host = dev->host;
|
||||
spi_transaction_t *trans = trans_buf->trans;
|
||||
spi_hal_context_t *hal = &(dev->host->hal);
|
||||
@@ -908,6 +909,7 @@ static void SPI_MASTER_ISR_ATTR s_sct_load_dma_link(spi_device_t *dev, spi_dma_d
|
||||
|
||||
static void SPI_MASTER_ISR_ATTR spi_new_sct_trans(spi_device_t *dev, spi_sct_trans_priv_t *cur_sct_trans)
|
||||
{
|
||||
assert(dev != NULL);
|
||||
dev->host->cur_cs = dev->id;
|
||||
|
||||
//Reconfigure according to device settings, the function only has effect when the dev_id is changed.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -774,10 +774,10 @@ esp_err_t esp_srp_exchange_proofs(esp_srp_handle_t *hd, char *username, uint16_t
|
||||
"Hash operation failed: status=%d, hash_len=%d", status, hash_len);
|
||||
int pad_len = hd->len_n - hd->len_g;
|
||||
s = calloc(pad_len, sizeof(char));
|
||||
ESP_RETURN_ON_FALSE(s, ESP_ERR_NO_MEM, TAG, "Failed to allocate memory");
|
||||
ESP_GOTO_ON_FALSE(s, ESP_ERR_NO_MEM, error, TAG, "Failed to allocate memory");
|
||||
|
||||
status = psa_hash_setup(&hash_op, PSA_ALG_SHA_512);
|
||||
ESP_RETURN_ON_FALSE(status == PSA_SUCCESS, ESP_FAIL, TAG, "Failed to setup hash operation: %d", status);
|
||||
ESP_GOTO_ON_FALSE(status == PSA_SUCCESS, ESP_FAIL, error, TAG, "Failed to setup hash operation: %d", status);
|
||||
|
||||
psa_hash_update(&hash_op, (unsigned char *)s, pad_len);
|
||||
psa_hash_update(&hash_op, (unsigned char *)hd->bytes_g, hd->len_g);
|
||||
@@ -790,7 +790,7 @@ esp_err_t esp_srp_exchange_proofs(esp_srp_handle_t *hd, char *username, uint16_t
|
||||
|
||||
unsigned char digest[SHA512_HASH_SZ];
|
||||
status = psa_hash_setup(&hash_op, PSA_ALG_SHA_512);
|
||||
ESP_RETURN_ON_FALSE(status == PSA_SUCCESS, ESP_FAIL, TAG, "Failed to setup hash operation: %d", status);
|
||||
ESP_GOTO_ON_FALSE(status == PSA_SUCCESS, ESP_FAIL, error, TAG, "Failed to setup hash operation: %d", status);
|
||||
|
||||
psa_hash_update(&hash_op, hash_n_xor_g, SHA512_HASH_SZ);
|
||||
psa_hash_update(&hash_op, hash_I, SHA512_HASH_SZ);
|
||||
@@ -808,7 +808,7 @@ esp_err_t esp_srp_exchange_proofs(esp_srp_handle_t *hd, char *username, uint16_t
|
||||
|
||||
/* M is now validated, let's proceed to H(AMK) */
|
||||
status = psa_hash_setup(&hash_op, PSA_ALG_SHA_512);
|
||||
ESP_RETURN_ON_FALSE(status == PSA_SUCCESS, ESP_FAIL, TAG, "Failed to setup hash operation: %d", status);
|
||||
ESP_GOTO_ON_FALSE(status == PSA_SUCCESS, ESP_FAIL, error, TAG, "Failed to setup hash operation: %d", status);
|
||||
|
||||
psa_hash_update(&hash_op, (unsigned char *)hd->bytes_A, hd->len_A);
|
||||
psa_hash_update(&hash_op, digest, SHA512_HASH_SZ);
|
||||
|
||||
Reference in New Issue
Block a user