* [review v2] Fix use of non-existent DIAGNOSTIC_IGNORE_UNUSED_FUNCTION
2019-12-12 13:03 [review] Fix use of non-existent DIAGNOSTIC_IGNORE_UNUSED_FUNCTION Luis Machado (Code Review)
@ 2019-12-12 13:03 ` Luis Machado (Code Review)
2019-12-12 16:22 ` Luis Machado (Code Review)
1 sibling, 0 replies; 3+ messages in thread
From: Luis Machado (Code Review) @ 2019-12-12 13:03 UTC (permalink / raw)
To: gdb-patches
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.
gdb/ChangeLog:
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(-)
diff --git a/gdb/gdbsupport/thread-pool.c b/gdb/gdbsupport/thread-pool.c
index f6ea6d8..1f96c16 100644
--- a/gdb/gdbsupport/thread-pool.c
+++ b/gdb/gdbsupport/thread-pool.c
@@ -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
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Ifabf1fdb1bbafe55541ae2a93111eef8ec9bf52c
Gerrit-Change-Number: 754
Gerrit-PatchSet: 2
Gerrit-Owner: Luis Machado <luis.machado@linaro.org>
Gerrit-MessageType: newpatchset
^ permalink raw reply [flat|nested] 3+ messages in thread
* [review] Fix use of non-existent DIAGNOSTIC_IGNORE_UNUSED_FUNCTION
@ 2019-12-12 13:03 Luis Machado (Code Review)
2019-12-12 13:03 ` [review v2] " Luis Machado (Code Review)
2019-12-12 16:22 ` Luis Machado (Code Review)
0 siblings, 2 replies; 3+ messages in thread
From: Luis Machado (Code Review) @ 2019-12-12 13:03 UTC (permalink / raw)
To: gdb-patches
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(-)
diff --git a/gdb/gdbsupport/thread-pool.c b/gdb/gdbsupport/thread-pool.c
index f6ea6d8..1f96c16 100644
--- a/gdb/gdbsupport/thread-pool.c
+++ b/gdb/gdbsupport/thread-pool.c
@@ -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
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Ifabf1fdb1bbafe55541ae2a93111eef8ec9bf52c
Gerrit-Change-Number: 754
Gerrit-PatchSet: 1
Gerrit-Owner: Luis Machado <luis.machado@linaro.org>
Gerrit-MessageType: newchange
^ permalink raw reply [flat|nested] 3+ messages in thread
* [review v2] Fix use of non-existent DIAGNOSTIC_IGNORE_UNUSED_FUNCTION
2019-12-12 13:03 [review] Fix use of non-existent DIAGNOSTIC_IGNORE_UNUSED_FUNCTION Luis Machado (Code Review)
2019-12-12 13:03 ` [review v2] " Luis Machado (Code Review)
@ 2019-12-12 16:22 ` Luis Machado (Code Review)
1 sibling, 0 replies; 3+ messages in thread
From: Luis Machado (Code Review) @ 2019-12-12 16:22 UTC (permalink / raw)
To: gdb-patches
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.
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Ifabf1fdb1bbafe55541ae2a93111eef8ec9bf52c
Gerrit-Change-Number: 754
Gerrit-PatchSet: 2
Gerrit-Owner: Luis Machado <luis.machado@linaro.org>
Gerrit-MessageType: abandon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-12-12 16:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-12 13:03 [review] Fix use of non-existent DIAGNOSTIC_IGNORE_UNUSED_FUNCTION Luis Machado (Code Review)
2019-12-12 13:03 ` [review v2] " Luis Machado (Code Review)
2019-12-12 16:22 ` Luis Machado (Code Review)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox