The handle_double_fault function is defined in trap.c and called
from x86_64/locore.S, but lacked a prototype, triggering a compiler
warning: 'no previous prototype for handle_double_fault'.

This change adds a forward declaration at the top of trap.c to
satisfy the compiler and clarify the function's external linkage.

No functional changes.
---
 i386/i386/trap.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/i386/i386/trap.c b/i386/i386/trap.c
index 90650b31..4f6c457f 100644
--- a/i386/i386/trap.c
+++ b/i386/i386/trap.c
@@ -65,6 +65,9 @@
 
 #include "debug.h"
 
+/* Called from assembly (locore.S) */
+void handle_double_fault(struct i386_saved_state *regs);
+
 #if    MACH_KDB
 boolean_t      debug_all_traps_with_kdb = FALSE;
 extern struct db_watchpoint *db_watchpoint_list;
-- 
2.40.1


Reply via email to