From 831997ca9b08763c3ef8408aadd859f2b61f4807 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Tue, 17 Sep 2024 11:23:03 +0200 Subject: [PATCH] fix: correct calloc call arguments order GCC 14 adds "calloc-transposed-args" warning which is an error at the default IDF build settings. --- driver/esp_camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver/esp_camera.c b/driver/esp_camera.c index 4b7e906a57..e39b597fa1 100644 --- a/driver/esp_camera.c +++ b/driver/esp_camera.c @@ -153,7 +153,7 @@ static esp_err_t camera_probe(const camera_config_t *config, camera_model_t *out return ESP_ERR_INVALID_STATE; } - s_state = (camera_state_t *) calloc(sizeof(camera_state_t), 1); + s_state = (camera_state_t *) calloc(1, sizeof(camera_state_t)); if (!s_state) { return ESP_ERR_NO_MEM; }