Skip to content

Commit 631f66b

Browse files
authored
Attribute __real_system_restart_local() as (noreturn) (#7167)
* Attribute `__real_system_restart_local()` as `(noreturn)` * As well as `abort()`. * Aggragate two decls into `coredecls.h`.
1 parent 726df69 commit 631f66b

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

Diff for: cores/esp8266/Esp.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,6 @@ bool EspClass::rtcUserMemoryWrite(uint32_t offset, uint32_t *data, size_t size)
193193
}
194194
}
195195

196-
197-
198-
extern "C" void __real_system_restart_local();
199196
void EspClass::reset(void)
200197
{
201198
__real_system_restart_local();

Diff for: cores/esp8266/core_esp8266_postmortem.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@
3232
#include "pgmspace.h"
3333
#include "gdb_hooks.h"
3434
#include "StackThunk.h"
35+
#include "coredecls.h"
3536

3637
extern "C" {
3738

38-
extern void __real_system_restart_local();
39-
4039
// These will be pointers to PROGMEM const strings
4140
static const char* s_panic_file = 0;
4241
static int s_panic_line = 0;

Diff for: cores/esp8266/coredecls.h

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ void esp_schedule();
2121
void tune_timeshift64 (uint64_t now_us);
2222
void disable_extra4k_at_link_time (void) __attribute__((noinline));
2323
bool sntp_set_timezone_in_seconds(int32_t timezone);
24+
void __real_system_restart_local() __attribute__((noreturn));
2425

2526
uint32_t sqrt32 (uint32_t n);
2627
uint32_t crc32 (const void* data, size_t length, uint32_t crc = 0xffffffff);

0 commit comments

Comments
 (0)