public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Use typedef in definition of warning_hook
Date: Wed, 14 Feb 2024 12:05:27 +0000 (GMT)	[thread overview]
Message-ID: <20240214120527.E93A43857011@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=172dc8923748b76120cf054d5f01b3230859f7b4

commit 172dc8923748b76120cf054d5f01b3230859f7b4
Author: Tom Tromey <tromey@adacore.com>
Date:   Tue Feb 13 13:20:22 2024 -0700

    Use typedef in definition of warning_hook
    
    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.

Diff:
---
 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.  */

                 reply	other threads:[~2024-02-14 12:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240214120527.E93A43857011@sourceware.org \
    --to=tromey@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).