Skip to content

Commit

Permalink
memdump: fix warnings.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
qiyuan-han authored and xiaoxiang781216 committed Oct 16, 2024
1 parent 3d8b504 commit ff4b654
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mm/mm_heap/mm_malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ff4b654

Please sign in to comment.