Fix the thread-pool.c compilation
authorTom Tromey <tromey@adacore.com>
Thu, 12 Dec 2019 13:09:40 +0000 (06:09 -0700)
committerTom Tromey <tromey@adacore.com>
Thu, 12 Dec 2019 13:10:27 +0000 (06:10 -0700)
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
gdb/gdbsupport/thread-pool.c

index 5ac4f9cb95e774702432523f926d397e61aeca3f..9dbc7b201255c26a662731e79aa495f3193b6d3d 100644 (file)
@@ -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.
index f6ea6d8b1711cd239c0487e8a2fd90f9427b77cc..cd548956951109f83161f8a5fca9a8acae6e2cec 100644 (file)
@@ -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
 
 #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
This page took 0.030054 seconds and 4 git commands to generate.