Skip to content

Commit

Permalink
fix: correct calloc call arguments order (#683)
Browse files Browse the repository at this point in the history
GCC 14 adds "calloc-transposed-args" warning which is an error at the
default IDF build settings.
  • Loading branch information
igrr authored Sep 17, 2024
1 parent 1a05a48 commit 4f57767
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion driver/esp_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4f57767

Please sign in to comment.