Skip to content

Commit ad14dbc

Browse files
add used attribute to two functions (project-chip#32545)
1 parent 9a947d8 commit ad14dbc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/platform/silabs/SoftwareFaultReports.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void OnSoftwareFaultEventHandler(const char * faultRecordString)
8282
/**
8383
* Log register contents to UART when a hard fault occurs.
8484
*/
85-
extern "C" void debugHardfault(uint32_t * sp)
85+
extern "C" __attribute__((used)) void debugHardfault(uint32_t * sp)
8686
{
8787
#if SILABS_LOG_ENABLED
8888
uint32_t cfsr = SCB->CFSR;

examples/platform/silabs/heap_4_silabs.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ void * __wrap_realloc(void * ptr, size_t new_size)
647647
return pvPortRealloc(ptr, new_size);
648648
}
649649

650-
void * __wrap_calloc(size_t num, size_t size)
650+
__attribute__((used)) void * __wrap_calloc(size_t num, size_t size)
651651
{
652652
return pvPortCalloc(num, size);
653653
}

0 commit comments

Comments
 (0)