diff options
author | Tom Tromey <tromey@adacore.com> | 2024-04-09 08:54:58 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-04-15 09:21:40 -0600 |
commit | 75670e0075df0f6fc8c324ea11de193a038274d6 (patch) | |
tree | 51dc4ba098d49dcf771c17fe82b4c298496f7423 /gdb/utils.c | |
parent | bdcd50f901e3db5b773b6462813a50b9649aad57 (diff) | |
download | gdb-75670e0075df0f6fc8c324ea11de193a038274d6.zip gdb-75670e0075df0f6fc8c324ea11de193a038274d6.tar.gz gdb-75670e0075df0f6fc8c324ea11de193a038274d6.tar.bz2 |
Avoid complaint warning on mingw
The mingw build currently issues a warning:
./../../src/gdb/utils.h:378:56: warning: ignoring attributes on template argument 'void(const char*, va_list)' {aka 'void(const char*, char*)'} [-Wignored-attributes]
This patch fixes the problem as suggested by Simon:
https://sourceware.org/pipermail/gdb-patches/2024-April/207908.html
...that is, by changing the warning interceptor to a class with a
single 'warn' method.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index ded03c7..6a77f6b 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -164,7 +164,7 @@ void vwarning (const char *string, va_list args) { if (warning_hook != nullptr) - warning_hook (string, args); + warning_hook->warn (string, args); else { std::optional<target_terminal::scoped_restore_terminal_state> term_state; |