]> granicus.if.org Git - esp-idf/commitdiff
gdbstub: Mark the panic handler entry as noreturn
authorAngus Gratton <angus@espressif.com>
Tue, 11 Jul 2017 02:18:08 +0000 (10:18 +0800)
committerAngus Gratton <gus@projectgus.com>
Tue, 11 Jul 2017 02:18:08 +0000 (10:18 +0800)
Fixes a warning in panic.c when this panic mode is enabled.

components/esp32/include/esp_gdbstub.h
components/esp32/panic.c

index bc26f2941a4f852f32a7a3eff01e913a44483890..9e7243aad07ab2151d5de79b8310a06a6a860bcb 100644 (file)
@@ -17,6 +17,6 @@
 #include <xtensa/config/core.h>
 #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
index 0023a02ebac0b8fc95283b7aadec7f776d1cd5e4..f5ef3170ac1e2189059ced1df585fad0ba000bb3 100644 (file)
@@ -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 */
 }