Skip to content

Commit ff4b654

Browse files
qiyuan-hanxiaoxiang781216
authored andcommitted
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 <hanqiyuan@xiaomi.com>
1 parent 3d8b504 commit ff4b654

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mm/mm_heap/mm_malloc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,11 @@ FAR void *mm_malloc(FAR struct mm_heap_s *heap, size_t size)
359359
# ifdef CONFIG_MM_DUMP_DETAILS_ON_FAILURE
360360
struct mm_memdump_s dump =
361361
{
362+
#if CONFIG_MM_BACKTRACE >= 0
362363
PID_MM_ALLOC, 0, ULONG_MAX
364+
#else
365+
PID_MM_ALLOC
366+
#endif
363367
};
364368
# endif
365369
#endif

0 commit comments

Comments
 (0)