diff --git a/components/bt/bluedroid/stack/btm/btm_ble.c b/components/bt/bluedroid/stack/btm/btm_ble.c index 872a24e6fa..2d3c751724 100644 --- a/components/bt/bluedroid/stack/btm/btm_ble.c +++ b/components/bt/bluedroid/stack/btm/btm_ble.c @@ -880,7 +880,7 @@ tBTM_SEC_ACTION btm_ble_determine_security_act(BOOLEAN is_originator, BD_ADDR bd auth_req |= BTM_LE_AUTH_REQ_MITM; } - tBTM_BLE_SEC_REQ_ACT ble_sec_act; + tBTM_BLE_SEC_REQ_ACT ble_sec_act = BTM_BLE_SEC_REQ_ACT_NONE; btm_ble_link_sec_check(bdaddr, auth_req, &ble_sec_act); BTM_TRACE_DEBUG ("%s ble_sec_act %d", __func__ , ble_sec_act); diff --git a/components/driver/rtc_module.c b/components/driver/rtc_module.c index c2bff692b4..bdcc43c1d6 100644 --- a/components/driver/rtc_module.c +++ b/components/driver/rtc_module.c @@ -508,9 +508,10 @@ static void touch_pad_filter_cb(void *arg) if (s_touch_pad_filter == NULL) { return; } - uint16_t val; + uint16_t val = 0; for (int i = 0; i < TOUCH_PAD_MAX; i++) { - touch_pad_read(i, &val); + (void) touch_pad_read(i, &val); + // if touch_pad_read fails then the previous value of val is used s_touch_pad_filter->filtered_val[i] = s_touch_pad_filter->filtered_val[i] == 0 ? (val << TOUCH_PAD_SHIFT_DEFAULT) : s_touch_pad_filter->filtered_val[i]; s_touch_pad_filter->filtered_val[i] = _touch_filter_iir((val << TOUCH_PAD_SHIFT_DEFAULT), s_touch_pad_filter->filtered_val[i], TOUCH_PAD_FILTER_FACTOR_DEFAULT); diff --git a/components/fatfs/src/vfs_fat.c b/components/fatfs/src/vfs_fat.c index 1e059e134e..439cc875f7 100644 --- a/components/fatfs/src/vfs_fat.c +++ b/components/fatfs/src/vfs_fat.c @@ -637,6 +637,7 @@ static int vfs_fat_readdir_r(void* ctx, DIR* pdir, vfs_fat_dir_t* fat_dir = (vfs_fat_dir_t*) pdir; FRESULT res = f_readdir(&fat_dir->ffdir, &fat_dir->filinfo); if (res != FR_OK) { + *out_dirent = NULL; ESP_LOGD(TAG, "%s: fresult=%d", __func__, res); return fresult_to_errno(res); } diff --git a/components/sdmmc/sdmmc_cmd.c b/components/sdmmc/sdmmc_cmd.c index 7279dec44c..f46dbf324b 100644 --- a/components/sdmmc/sdmmc_cmd.c +++ b/components/sdmmc/sdmmc_cmd.c @@ -321,7 +321,7 @@ esp_err_t sdmmc_card_init(const sdmmc_host_t* config, sdmmc_card_t* card) } else { /* IO card */ if (config->flags & SDMMC_HOST_FLAG_4BIT) { - uint8_t card_cap; + uint8_t card_cap = 0; err = sdmmc_io_rw_direct(card, 0, SD_IO_CCCR_CARD_CAP, SD_ARG_CMD52_READ, &card_cap); if (err != ESP_OK) {