66 lines
1.8 KiB
Diff
66 lines
1.8 KiB
Diff
|
Fix the thread-pool.c compilation
|
||
|
|
||
|
A recent commit removed DIAGNOSTIC_IGNORE_UNUSED_FUNCTION, which was
|
||
|
used in thread-pool.c. This patch changes this code to use
|
||
|
ATTRIBUTE_UNUSED instead.
|
||
|
|
||
|
Tested by rebuilding.
|
||
|
|
||
|
gdb/ChangeLog
|
||
|
2019-12-12 Tom Tromey <tromey@adacore.com>
|
||
|
|
||
|
* gdbsupport/thread-pool.c (set_thread_name): Use
|
||
|
ATTRIBUTE_UNUSED.
|
||
|
|
||
|
Change-Id: I56d46eaac73690565d0e52db1791411567a918dd
|
||
|
|
||
|
---
|
||
|
gdb/ChangeLog | 5 +++++
|
||
|
gdb/gdbsupport/thread-pool.c | 10 ++--------
|
||
|
2 files changed, 7 insertions(+), 8 deletions(-)
|
||
|
|
||
|
diff --git a/gdb/gdbsupport/thread-pool.c b/gdb/gdbsupport/thread-pool.c
|
||
|
index 1b3e44c670..fc83ff765f 100644
|
||
|
--- a/gdb/gdbsupport/thread-pool.c
|
||
|
+++ b/gdb/gdbsupport/thread-pool.c
|
||
|
@@ -25,7 +25,6 @@
|
||
|
#include "gdbsupport/alt-stack.h"
|
||
|
#include "gdbsupport/block-signals.h"
|
||
|
#include <algorithm>
|
||
|
-#include "diagnostics.h"
|
||
|
|
||
|
/* On the off chance that we have the pthread library on a Windows
|
||
|
host, but std::thread is not using it, avoid calling
|
||
|
@@ -40,14 +39,11 @@
|
||
|
|
||
|
#include <pthread.h>
|
||
|
|
||
|
-DIAGNOSTIC_PUSH
|
||
|
-DIAGNOSTIC_IGNORE_UNUSED_FUNCTION
|
||
|
-
|
||
|
/* Handle platform discrepancies in pthread_setname_np: macOS uses a
|
||
|
single-argument form, while Linux uses a two-argument form. This
|
||
|
wrapper handles the difference. */
|
||
|
|
||
|
-static void
|
||
|
+ATTRIBUTE_UNUSED static void
|
||
|
set_thread_name (int (*set_name) (pthread_t, const char *), const char *name)
|
||
|
{
|
||
|
set_name (pthread_self (), name);
|
||
|
@@ -55,14 +51,12 @@ set_thread_name (int (*set_name) (pthread_t, const char *), const char *name)
|
||
|
|
||
|
/* The macOS man page says that pthread_setname_np returns "void", but
|
||
|
the headers actually declare it returning "int". */
|
||
|
-static void
|
||
|
+ATTRIBUTE_UNUSED static void
|
||
|
set_thread_name (int (*set_name) (const char *), const char *name)
|
||
|
{
|
||
|
set_name (name);
|
||
|
}
|
||
|
|
||
|
-DIAGNOSTIC_POP
|
||
|
-
|
||
|
#endif /* USE_PTHREAD_SETNAME_NP */
|
||
|
|
||
|
namespace gdb
|