[pushed] Use typedef in definition of warning_hook

Message ID 20240214120302.2299676-1-tromey@adacore.com
State New
Headers
Series [pushed] Use typedef in definition of warning_hook |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 warning Patch is already merged
linaro-tcwg-bot/tcwg_gdb_build--master-arm warning Patch is already merged

Commit Message

Tom Tromey Feb. 14, 2024, 12:03 p.m. UTC
  This changes the global 'warning_hook' to use the warning_hook_handler
typedef in its definition.  This makes it a little easier to change
the type, should that be needed.
---
 gdb/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/gdb/utils.c b/gdb/utils.c
index a1aeb1025fa..68aebf37381 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -131,7 +131,7 @@  show_pagination_enabled (struct ui_file *file, int from_tty,
 /* Warning hook pointer.  This has to be 'static' to avoid link
    problems with thread-locals on AIX.  */
 
-static thread_local void (*warning_hook) (const char *, va_list);
+static thread_local warning_hook_handler warning_hook;
 
 /* See utils.h.  */