aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-12-12 06:09:40 -0700
committerTom Tromey <tromey@adacore.com>2019-12-12 06:10:27 -0700
commit2ffe5b9c792fe78dbbcbe31b6fea751285df8876 (patch)
tree51788211e77cd7e79fbe8808ca5f13977c5f11c3 /gdb
parent39f34d7b64ee76e07b82a3e57800905d249d8005 (diff)
downloadgdb-2ffe5b9c792fe78dbbcbe31b6fea751285df8876.zip
gdb-2ffe5b9c792fe78dbbcbe31b6fea751285df8876.tar.gz
gdb-2ffe5b9c792fe78dbbcbe31b6fea751285df8876.tar.bz2
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
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/gdbsupport/thread-pool.c10
2 files changed, 7 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5ac4f9c..9dbc7b2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2019-12-12 Tom Tromey <tromey@adacore.com>
+
+ * gdbsupport/thread-pool.c (set_thread_name): Use
+ ATTRIBUTE_UNUSED.
+
2019-12-12 Luis Machado <luis.machado@linaro.org>
* gdbsupport/safe-strerror.c: Don't include diagnostics.h.
diff --git a/gdb/gdbsupport/thread-pool.c b/gdb/gdbsupport/thread-pool.c
index f6ea6d8..cd54895 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,27 +39,22 @@
#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);
}
-static void
+ATTRIBUTE_UNUSED static void
set_thread_name (void (*set_name) (const char *), const char *name)
{
set_name (name);
}
-DIAGNOSTIC_POP
-
#endif /* USE_PTHREAD_SETNAME_NP */
namespace gdb