public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [pushed] Use typedef in definition of warning_hook
@ 2024-02-14 12:03 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2024-02-14 12:03 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

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(-)

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.  */
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-14 12:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-14 12:03 [pushed] Use typedef in definition of warning_hook Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).