This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit ff4b654be0254b0ca0970acb18bf3458bf5e3193 Author: hanqiyuan <[email protected]> AuthorDate: Mon Aug 28 22:04:12 2023 +0800 memdump: fix warnings. mm_heap/mm_malloc.c: In function 'mm_malloc': mm_heap/mm_malloc.c:281:33: warning: excess elements in struct initializer 281 | MM_BACKTRACE_ALLOC_PID, 0, ULONG_MAX | ^ mm_heap/mm_malloc.c:281:33: note: (near initialization for 'dump') mm_heap/mm_malloc.c:281:36: warning: excess elements in struct initializer 281 | MM_BACKTRACE_ALLOC_PID, 0, ULONG_MAX | ^~~~~~~~~ mm_heap/mm_malloc.c:281:36: note: (near initialization for 'dump') Signed-off-by: hanqiyuan <[email protected]> --- mm/mm_heap/mm_malloc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mm/mm_heap/mm_malloc.c b/mm/mm_heap/mm_malloc.c index 18fae3511b..dc201b16f5 100644 --- a/mm/mm_heap/mm_malloc.c +++ b/mm/mm_heap/mm_malloc.c @@ -359,7 +359,11 @@ FAR void *mm_malloc(FAR struct mm_heap_s *heap, size_t size) # ifdef CONFIG_MM_DUMP_DETAILS_ON_FAILURE struct mm_memdump_s dump = { +#if CONFIG_MM_BACKTRACE >= 0 PID_MM_ALLOC, 0, ULONG_MAX +#else + PID_MM_ALLOC +#endif }; # endif #endif
