From patchwork Thu Dec 12 13:03:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Simon Marchi (Code Review)" X-Patchwork-Id: 36778 Received: (qmail 25376 invoked by alias); 12 Dec 2019 13:03:05 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 25363 invoked by uid 89); 12 Dec 2019 13:03:05 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1801, DIAGNOSTIC X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Dec 2019 13:03:04 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id B00AB20250; Thu, 12 Dec 2019 08:03:02 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [8.43.85.239]) by mx1.osci.io (Postfix) with ESMTP id 6B009202F7 for ; Thu, 12 Dec 2019 08:03:00 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 3096B20AF6 for ; Thu, 12 Dec 2019 08:03:00 -0500 (EST) X-Gerrit-PatchSet: 1 Date: Thu, 12 Dec 2019 08:03:00 -0500 From: "Luis Machado (Code Review)" To: gdb-patches@sourceware.org Message-ID: Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange Subject: [review] Fix use of non-existent DIAGNOSTIC_IGNORE_UNUSED_FUNCTION X-Gerrit-Change-Id: Ifabf1fdb1bbafe55541ae2a93111eef8ec9bf52c X-Gerrit-Change-Number: 754 X-Gerrit-ChangeURL: X-Gerrit-Commit: 04af258aaedfe4eb436c92692c3b43845f461680 References: Reply-To: luis.machado@linaro.org, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 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 * 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 -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