From c049cd55a6a994aa049cd66ef0f0a70a18ea65f7 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Tue, 11 Jul 2017 10:18:08 +0800 Subject: [PATCH] gdbstub: Mark the panic handler entry as noreturn Fixes a warning in panic.c when this panic mode is enabled. --- components/esp32/include/esp_gdbstub.h | 4 ++-- components/esp32/panic.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/esp32/include/esp_gdbstub.h b/components/esp32/include/esp_gdbstub.h index bc26f2941..9e7243aad 100644 --- a/components/esp32/include/esp_gdbstub.h +++ b/components/esp32/include/esp_gdbstub.h @@ -17,6 +17,6 @@ #include #include "freertos/xtensa_api.h" -void esp_gdbstub_panic_handler(XtExcFrame *frame); +void esp_gdbstub_panic_handler(XtExcFrame *frame) __attribute__((noreturn)); -#endif \ No newline at end of file +#endif diff --git a/components/esp32/panic.c b/components/esp32/panic.c index 0023a02eb..f5ef3170a 100644 --- a/components/esp32/panic.c +++ b/components/esp32/panic.c @@ -479,7 +479,7 @@ static __attribute__((noreturn)) void commonErrorHandler(XtExcFrame *frame) esp_core_dump_to_uart(frame); #endif reconfigureAllWdts(); -#endif +#endif /* CONFIG_ESP32_ENABLE_COREDUMP */ esp_panic_wdt_stop(); #if CONFIG_ESP32_PANIC_PRINT_REBOOT || CONFIG_ESP32_PANIC_SILENT_REBOOT panicPutStr("Rebooting...\r\n"); @@ -493,8 +493,8 @@ static __attribute__((noreturn)) void commonErrorHandler(XtExcFrame *frame) disableAllWdts(); panicPutStr("CPU halted.\r\n"); while (1); -#endif -#endif +#endif /* CONFIG_ESP32_PANIC_PRINT_REBOOT || CONFIG_ESP32_PANIC_SILENT_REBOOT */ +#endif /* CONFIG_ESP32_PANIC_GDBSTUB */ }