Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: pager: fix arguments passed to calloc in alloc_merged_pgt_array()
An error was reported when compiling with GCC14 on this calloc: core/arch/arm/mm/tee_pager.c: In function 'alloc_merged_pgt_array': core/arch/arm/mm/tee_pager.c:934:35: warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 934 | pgt_array = calloc(sizeof(struct pgt *), pgt_count); | ^~~~~~ Looking at the code, it seems that pgt_count and sizeof(struct pgt *) are inverted. Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Fixes: 60e3671 ("core: pager fix alloc_merged_pgt_array()") Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
- Loading branch information