fix(esp_mm): fix warnings found by GNU static analyzer

This commit is contained in:
Alexey Lapshin
2024-06-06 15:17:27 +07:00
committed by BOT
parent 4a0c96beb1
commit 6c4dac64a7

View File

@@ -147,7 +147,7 @@ esp_err_t esp_cache_aligned_malloc_prefer(size_t size, void **out_ptr, size_t *a
*out_ptr = NULL; *out_ptr = NULL;
while (flag_nums--) { while (flag_nums--) {
flags = va_arg(argp, uint32_t); flags = va_arg(argp, int);
ret = esp_cache_aligned_malloc_internal(size, flags, out_ptr, actual_size); ret = esp_cache_aligned_malloc_internal(size, flags, out_ptr, actual_size);
if (ret == ESP_OK) { if (ret == ESP_OK) {
break; break;
@@ -201,8 +201,6 @@ esp_err_t esp_cache_aligned_calloc_prefer(size_t n, size_t size, void **out_ptr,
if (ret == ESP_OK) { if (ret == ESP_OK) {
memset(ptr, 0, size_bytes); memset(ptr, 0, size_bytes);
*out_ptr = ptr; *out_ptr = ptr;
arg = va_arg(argp, int);
break; break;
} }