Skip to content

Commit 3065a3f

Browse files
Dummy size for heap to avoid GCC 8/9 warnings
Make GCC think _heap_start is large enough to avoid the basic (and incorrect) bounds-checking warnings it produces. The size chosen is arbitrary and does not affect the actual size of the heap in any way.
1 parent a15ab56 commit 3065a3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp8266/umm_malloc/umm_malloc_cfg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void* realloc_loc (void* p, size_t s, const char* file, int line);
9191
#define UMM_BEST_FIT
9292

9393
/* Start addresses and the size of the heap */
94-
extern char _heap_start;
94+
extern char _heap_start[1024];
9595
#define UMM_MALLOC_CFG__HEAP_ADDR ((uint32_t)&_heap_start)
9696
#define UMM_MALLOC_CFG__HEAP_SIZE ((size_t)(0x3fffc000 - UMM_MALLOC_CFG__HEAP_ADDR))
9797

0 commit comments

Comments
 (0)