diff --git a/README.md b/README.md index 48b8032..37e3704 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,5 @@ # ESP32 ESP-IDF component for AHT Series Humidity & Temperature Sensor -## SAST Tools - -[PVS-Studio](https://pvs-studio.com/pvs-studio/?utm_source=website&utm_medium=github&utm_campaign=open_source) - static analyzer for C, C++, C#, and Java code. - ## Features 1. Support of AHT10/AHT15/AHT20/AHT21/AHT25/AHT30/AHT40. diff --git a/zh_aht.c b/zh_aht.c index 3957b21..f52be69 100644 --- a/zh_aht.c +++ b/zh_aht.c @@ -66,7 +66,7 @@ static esp_err_t _zh_aht_i2c_init(const zh_aht_init_config_t *config, zh_aht_han */ static uint8_t _zh_aht_calc_crc(const uint8_t *buf, size_t len); -esp_err_t zh_aht_init(const zh_aht_init_config_t *config, zh_aht_handle_t **handle) // -V2008 +esp_err_t zh_aht_init(const zh_aht_init_config_t *config, zh_aht_handle_t **handle) { ZH_LOGI("AHT initialization begin."); ZH_ERROR_CHECK(config != NULL && handle != NULL, ESP_ERR_INVALID_ARG, NULL, "AHT initialization failed. Invalid argument."); @@ -90,7 +90,7 @@ esp_err_t zh_aht_deinit(zh_aht_handle_t **handle) return ESP_OK; } -esp_err_t zh_aht_read(zh_aht_handle_t **handle, float *humidity, float *temperature) // -V2008 +esp_err_t zh_aht_read(zh_aht_handle_t **handle, float *humidity, float *temperature) { ZH_LOGI("AHT read begin."); ZH_ERROR_CHECK(handle != NULL && *handle != NULL && humidity != NULL && temperature != NULL, ESP_ERR_INVALID_ARG, NULL, "AHT read fail. Invalid argument."); @@ -139,7 +139,7 @@ static esp_err_t _zh_aht_validate_config(const zh_aht_init_config_t *config) return ESP_OK; } -static esp_err_t _zh_aht_i2c_init(const zh_aht_init_config_t *config, zh_aht_handle_t *handle) // -V2008 +static esp_err_t _zh_aht_i2c_init(const zh_aht_init_config_t *config, zh_aht_handle_t *handle) { i2c_device_config_t aht_config = { .dev_addr_length = I2C_ADDR_BIT_LEN_7,