From patchwork Thu Dec 12 13:11:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 36780 Received: (qmail 64309 invoked by alias); 12 Dec 2019 13:12:00 -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 64294 invoked by uid 89); 12 Dec 2019 13:12:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Dec 2019 13:11:58 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 4472756083; Thu, 12 Dec 2019 08:11:57 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id eAQT9BDzwn6O; Thu, 12 Dec 2019 08:11:57 -0500 (EST) Received: from murgatroyd.Home (75-166-123-50.hlrn.qwest.net [75.166.123.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id 01AE15607F; Thu, 12 Dec 2019 08:11:56 -0500 (EST) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [FYI] Fix the thread-pool.c compilation Date: Thu, 12 Dec 2019 06:11:55 -0700 Message-Id: <20191212131155.29291-1-tromey@adacore.com> MIME-Version: 1.0 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 * gdbsupport/thread-pool.c (set_thread_name): Use ATTRIBUTE_UNUSED. Change-Id: I56d46eaac73690565d0e52db1791411567a918dd --- gdb/ChangeLog | 5 +++++ gdb/gdbsupport/thread-pool.c | 10 ++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/gdb/gdbsupport/thread-pool.c b/gdb/gdbsupport/thread-pool.c index f6ea6d8b171..cd548956951 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 -#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 -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