[review] Fix use of non-existent DIAGNOSTIC_IGNORE_UNUSED_FUNCTION
Commit Message
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/754
......................................................................
Fix use of non-existent DIAGNOSTIC_IGNORE_UNUSED_FUNCTION
A previous commit removed DIAGNOSTIC_IGNORE_UNUSED_FUNCTION because it is
known not to work correctly for some older versions of GCC.
2019-12-12 Luis Machado <luis.machado@linaro.org>
* gdbsupport/thread-pool.c (set_thread_name): Add ATTRIBUTE_UNUSED
to both functions.
Remove use of DIAGNOSTIC PUSH/POP and DIAGNOSTIC_IGNORE_UNUSED_FUNCTION.
Change-Id: Ifabf1fdb1bbafe55541ae2a93111eef8ec9bf52c
---
M gdb/gdbsupport/thread-pool.c
1 file changed, 2 insertions(+), 7 deletions(-)
Comments
Luis Machado has abandoned this change. ( https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/754 )
Change subject: Fix use of non-existent DIAGNOSTIC_IGNORE_UNUSED_FUNCTION
......................................................................
Abandoned
Abanboning due to another commit being pushed.
@@ -40,27 +40,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