From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id yaEfA+k6NWqDVA8AWB0awg (envelope-from ) for ; Fri, 19 Jun 2026 08:49:45 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=Zb+n9RYv; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=TXaxT4NA; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=o32MSL2X; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=Pgl8ImnZ; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id F12DD1E024; Fri, 19 Jun 2026 08:49:44 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B965A1E024 for ; Fri, 19 Jun 2026 08:49:43 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 405854BAE7C3 for ; Fri, 19 Jun 2026 12:49:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 405854BAE7C3 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=Zb+n9RYv; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=TXaxT4NA; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=o32MSL2X; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=Pgl8ImnZ Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by sourceware.org (Postfix) with ESMTPS id 983874BA2E05 for ; Fri, 19 Jun 2026 12:49:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 983874BA2E05 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 983874BA2E05 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1781873353; cv=none; b=FR8Sf1N0tOMIP7jNa0B2YQBDCBtZ0HLsyW8leowpVrQyRM3+B3YsDsYoT+YghtDsmXgS+Wqa1o0jDcEmw8TffLBM4+ZEPKakOj59hCSmaBAp/wKo5QSji3xjqo7aidFZpOCnrslHFcrsGPOs+8SUm7W1TFnC8PWBDgAioIpACi4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1781873353; c=relaxed/simple; bh=KeHFXawqWwRCYi3S6doMfWo8ICXbZw/JbsPeHWCKiaI=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=tkPRJ4D1XcIByA8ffHkyMYyMgKke3D1e80hWncvSeHRgnn9nnxYNz9NTHnHWI7P5uIUuXgxLPDPOc2kpiSfq7fYJcvPXIXrWLnU+aBtNULLgzc7qw7Oqz5rOJRiYT/1PmtwYplte5uZyb2FAaxhEIpPQlWqrJ3TQqt2ck1m6DWg= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=Zb+n9RYv; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=TXaxT4NA; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=o32MSL2X; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=Pgl8ImnZ DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 983874BA2E05 Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C86DD75D2F; Fri, 19 Jun 2026 12:49:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1781873352; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b8/OYLevG0JLop8FeV54FYEpYHbQjO9TkAsCCvRRjT8=; b=Zb+n9RYvItFFb0Hn7mAns96mP6CGiJHCkAt0KTGixT6H+rVajhuHLcO9lX5j7K620f3Iyg S6WBz4Q0EHtjsob2n3HUnhv+5IswnF8AjnxpOKZljlmmtdxRlZFXbzhgKKafmbU4NCiHi0 f9A3z5aaQ7doi0BLzm2YquJqI77gy0c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1781873352; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b8/OYLevG0JLop8FeV54FYEpYHbQjO9TkAsCCvRRjT8=; b=TXaxT4NAK6sGE/1v8WUbymVlJCApaiYfYqfxeKqIvC4Sq6TvPOGhBaA3H3z+E5Ndb7OM95 F4PWGge/33wQlWCQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1781873350; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b8/OYLevG0JLop8FeV54FYEpYHbQjO9TkAsCCvRRjT8=; b=o32MSL2XRIhs6nC+VP/L6sRDkZRLmYoU0WZuezMq55nZGYJZtZSSsetN+cUpZWRpiHPKFa QPIJxZlJIIOFbUB6k7ukMPgwSdVoq0UuJllQaHRRCuyiYtfEmpLW39v6n8a7WfE1lAEjv1 rJCYxJ3es6ahUroOIngIHxQUQl8TfYo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1781873350; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b8/OYLevG0JLop8FeV54FYEpYHbQjO9TkAsCCvRRjT8=; b=Pgl8ImnZiQpRmLrr7ZT6c12slypP4eCx0eG9pAAg8qwSeRP2vh9ER1Ky+kgeJ1uGhRt/0l qlmnODGJeN8xO/Bg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B197F779A8; Fri, 19 Jun 2026 12:49:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id kPTwKcY6NWpDOgAAD6G6ig (envelope-from ); Fri, 19 Jun 2026 12:49:10 +0000 Message-ID: <56913a13-2ca4-4c0b-be00-5f1c479122a7@suse.de> Date: Fri, 19 Jun 2026 14:49:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] gdb, gdbserver, gdbsupport: use [[maybe_unused]] instead of ATTRIBUTE_UNUSED To: simon.marchi@polymtl.ca, gdb-patches@sourceware.org References: <20260618175118.3758778-1-simon.marchi@polymtl.ca> Content-Language: en-US From: Tom de Vries In-Reply-To: <20260618175118.3758778-1-simon.marchi@polymtl.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-0.997]; MIME_GOOD(-0.10)[text/plain]; MID_RHS_MATCH_FROM(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email, suse.de:mid, polymtl.ca:email, imap1.dmz-prg2.suse.org:helo] X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 6/18/26 7:50 PM, simon.marchi@polymtl.ca wrote: > From: Simon Marchi > > Since we require C++17, replace the uses of the ATTRIBUTE_UNUSED macro > (which expands to __attribute__ ((__unused__))) with the standard > [[maybe_unused]] attribute. > > I think that some of these attribute uses are not necessary, but I did > not make an attempt to remove them, that would be for another patch. > Hi, these both look fine to me. Reviewed-By: Tom de Vries Thanks, - Tom > Change-Id: I62529d94153c65e2b3c49ff5330292e60c8a0f9e > --- > gdb/inferior.c | 4 ++-- > gdb/inflow.c | 2 +- > gdb/linux-fork.c | 2 +- > gdb/mi/mi-interp.c | 2 +- > gdb/python/py-utils.c | 2 +- > gdb/remote.c | 2 +- > gdb/source-cache.c | 6 +++--- > gdb/thread.c | 4 ++-- > gdb/typeprint.c | 4 ++-- > gdb/unittests/enum-flags-selftests.c | 4 ++-- > gdb/valprint.c | 4 ++-- > gdbserver/linux-aarch64-low.cc | 6 +++--- > gdbserver/x86-tdesc.h | 4 ++-- > gdbsupport/safe-strerror.cc | 4 ++-- > gdbsupport/thread-pool.cc | 6 +++--- > 15 files changed, 28 insertions(+), 28 deletions(-) > > diff --git a/gdb/inferior.c b/gdb/inferior.c > index 1481f46cdd18..7d54845f28ac 100644 > --- a/gdb/inferior.c > +++ b/gdb/inferior.c > @@ -432,7 +432,7 @@ find_inferior_for_program_space (struct program_space *pspace) > int > have_inferiors (void) > { > - for (inferior *inf ATTRIBUTE_UNUSED : all_non_exited_inferiors ()) > + for ([[maybe_unused]] inferior *inf : all_non_exited_inferiors ()) > return 1; > > return 0; > @@ -449,7 +449,7 @@ number_of_live_inferiors (process_stratum_target *proc_target) > > for (inferior *inf : all_non_exited_inferiors (proc_target)) > if (inf->has_execution ()) > - for (thread_info &tp ATTRIBUTE_UNUSED : inf->non_exited_threads ()) > + for ([[maybe_unused]] thread_info &tp : inf->non_exited_threads ()) > { > /* Found a live thread in this inferior, go to the next > inferior. */ > diff --git a/gdb/inflow.c b/gdb/inflow.c > index c40ad2cf5294..e3a080dbd657 100644 > --- a/gdb/inflow.c > +++ b/gdb/inflow.c > @@ -493,7 +493,7 @@ child_terminal_ours_1 (target_terminal_state desired_state) > > if (gdb_tty_state != desired_state) > { > - int result ATTRIBUTE_UNUSED; > + [[maybe_unused]] int result; > > /* Ignore SIGTTOU since it will happen when we try to set the > terminal's pgrp. */ > diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c > index 92afa4dde6db..fac35e13afb8 100644 > --- a/gdb/linux-fork.c > +++ b/gdb/linux-fork.c > @@ -963,7 +963,7 @@ inf_has_multiple_threads () > > /* Return true as soon as we see the second thread of the current > inferior. */ > - for (thread_info &tp ATTRIBUTE_UNUSED : current_inferior ()->threads ()) > + for ([[maybe_unused]] thread_info &tp : current_inferior ()->threads ()) > if (++count > 1) > return true; > > diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c > index 1a0d34106ed1..998409563e97 100644 > --- a/gdb/mi/mi-interp.c > +++ b/gdb/mi/mi-interp.c > @@ -637,7 +637,7 @@ static bool > multiple_inferiors_p () > { > int count = 0; > - for (inferior *inf ATTRIBUTE_UNUSED : all_non_exited_inferiors ()) > + for ([[maybe_unused]] inferior *inf : all_non_exited_inferiors ()) > { > count++; > if (count > 1) > diff --git a/gdb/python/py-utils.c b/gdb/python/py-utils.c > index a831b96eb387..3979343acde9 100644 > --- a/gdb/python/py-utils.c > +++ b/gdb/python/py-utils.c > @@ -314,7 +314,7 @@ gdb_py_int_as_long (PyObject *obj, long *result) > > PyObject * > gdb_py_generic_dict_getter (PyObject *self, > - void *closure ATTRIBUTE_UNUSED) > + [[maybe_unused]] void *closure) > { > PyObject **py_dict_ptr = gdbpy_dict_wrapper::compute_addr (self); > PyObject *py_dict = *py_dict_ptr; > diff --git a/gdb/remote.c b/gdb/remote.c > index f8c7383cb037..43df087b83b3 100644 > --- a/gdb/remote.c > +++ b/gdb/remote.c > @@ -4546,7 +4546,7 @@ static bool > has_single_non_exited_thread (inferior *inf) > { > int count = 0; > - for (thread_info &tp ATTRIBUTE_UNUSED : inf->non_exited_threads ()) > + for ([[maybe_unused]] thread_info &tp : inf->non_exited_threads ()) > if (++count > 1) > break; > return count == 1; > diff --git a/gdb/source-cache.c b/gdb/source-cache.c > index 6e8acab35044..0a64745ee585 100644 > --- a/gdb/source-cache.c > +++ b/gdb/source-cache.c > @@ -199,9 +199,9 @@ get_language_name (enum language lang) > succeeded. */ > > static bool > -try_source_highlight (std::string &contents ATTRIBUTE_UNUSED, > - enum language lang ATTRIBUTE_UNUSED, > - const std::string &fullname ATTRIBUTE_UNUSED) > +try_source_highlight ([[maybe_unused]] std::string &contents, > + [[maybe_unused]] enum language lang, > + [[maybe_unused]] const std::string &fullname) > { > #ifdef HAVE_SOURCE_HIGHLIGHT > if (!use_gnu_source_highlight) > diff --git a/gdb/thread.c b/gdb/thread.c > index 96c733e0629b..ffb980546b93 100644 > --- a/gdb/thread.c > +++ b/gdb/thread.c > @@ -476,7 +476,7 @@ thread_step_over_chain_length (const thread_step_over_list &l) > { > int num = 0; > > - for (const thread_info &thread ATTRIBUTE_UNUSED : l) > + for ([[maybe_unused]] const thread_info &thread : l) > ++num; > > return num; > @@ -626,7 +626,7 @@ find_thread (find_thread_callback_ftype callback) > bool > any_thread_p () > { > - for (thread_info &tp ATTRIBUTE_UNUSED : all_threads ()) > + for ([[maybe_unused]] thread_info &tp : all_threads ()) > return true; > return false; > } > diff --git a/gdb/typeprint.c b/gdb/typeprint.c > index 31a9c1814a31..01c6c218a5d5 100644 > --- a/gdb/typeprint.c > +++ b/gdb/typeprint.c > @@ -516,11 +516,11 @@ ptype_command (const char *type_name, int from_tty) > } > > /* Meant to be used in debug sessions, so don't export it in a header file. */ > -extern void ATTRIBUTE_UNUSED debug_type (struct type *type); > +[[maybe_unused]] extern void debug_type (struct type *type); > > /* Print TYPE. */ > > -void ATTRIBUTE_UNUSED > +[[maybe_unused]] void > debug_type (struct type *type) > { > type_print (type, "", gdb_stdlog, 1); > diff --git a/gdb/unittests/enum-flags-selftests.c b/gdb/unittests/enum-flags-selftests.c > index bf748e873035..ca404bfa3ebe 100644 > --- a/gdb/unittests/enum-flags-selftests.c > +++ b/gdb/unittests/enum-flags-selftests.c > @@ -70,8 +70,8 @@ static_assert (std::is_trivially_copyable::value); > below. Their names (and types) match the uppercase type names > exposed by CHECK_VALID just to make the expressions easier to > follow. */ > -static RawEnum re ATTRIBUTE_UNUSED; > -static EnumFlag ef ATTRIBUTE_UNUSED; > +[[maybe_unused]] static RawEnum re; > +[[maybe_unused]] static EnumFlag ef; > > /* First, compile-time tests that: > > diff --git a/gdb/valprint.c b/gdb/valprint.c > index 50a4663ca3b5..67bfbf589301 100644 > --- a/gdb/valprint.c > +++ b/gdb/valprint.c > @@ -1232,11 +1232,11 @@ value_print (struct value *val, struct ui_file *stream, > } > > /* Meant to be used in debug sessions, so don't export it in a header file. */ > -extern void ATTRIBUTE_UNUSED debug_val (struct value *val); > +[[maybe_unused]] extern void debug_val (struct value *val); > > /* Print VAL. */ > > -void ATTRIBUTE_UNUSED > +[[maybe_unused]] void > debug_val (struct value *val) > { > value_print (val, gdb_stdlog, &user_print_options); > diff --git a/gdbserver/linux-aarch64-low.cc b/gdbserver/linux-aarch64-low.cc > index a2588a6e2a9c..b68d39e1b803 100644 > --- a/gdbserver/linux-aarch64-low.cc > +++ b/gdbserver/linux-aarch64-low.cc > @@ -741,7 +741,7 @@ aarch64_target::low_new_fork (process_info *parent, > > static void > aarch64_sve_regs_copy_to_regcache (struct regcache *regcache, > - ATTRIBUTE_UNUSED const void *buf) > + [[maybe_unused]] const void *buf) > { > /* BUF is unused here since we collect the data straight from a ptrace > request in aarch64_sve_regs_copy_to_reg_buf, therefore bypassing > @@ -776,7 +776,7 @@ aarch64_sve_regs_copy_from_regcache (struct regcache *regcache, void *buf) > > static void > aarch64_za_regs_copy_to_regcache (struct regcache *regcache, > - ATTRIBUTE_UNUSED const void *buf) > + [[maybe_unused]] const void *buf) > { > /* BUF is unused here since we collect the data straight from a ptrace > request, therefore bypassing gdbserver's own call to ptrace. */ > @@ -822,7 +822,7 @@ aarch64_za_regs_copy_from_regcache (struct regcache *regcache, void *buf) > > static void > aarch64_zt_regs_copy_to_regcache (struct regcache *regcache, > - ATTRIBUTE_UNUSED const void *buf) > + [[maybe_unused]] const void *buf) > { > /* BUF is unused here since we collect the data straight from a ptrace > request, therefore bypassing gdbserver's own call to ptrace. */ > diff --git a/gdbserver/x86-tdesc.h b/gdbserver/x86-tdesc.h > index 4ed6d6635bbb..ce0c6c1be90d 100644 > --- a/gdbserver/x86-tdesc.h > +++ b/gdbserver/x86-tdesc.h > @@ -20,8 +20,8 @@ > > /* The "expedite" registers for x86 targets. Since whether the > variable is used depends on host/configuration, we mark it > - ATTRIBUTE_UNUSED to keep it simple here. */ > -static const char *i386_expedite_regs[] ATTRIBUTE_UNUSED > + [[maybe_unused]] to keep it simple here. */ > +[[maybe_unused]] static const char *i386_expedite_regs[] > = {"ebp", "esp", "eip", NULL}; > > #ifdef __x86_64__ > diff --git a/gdbsupport/safe-strerror.cc b/gdbsupport/safe-strerror.cc > index d53cf84511fd..ad25cfc3d765 100644 > --- a/gdbsupport/safe-strerror.cc > +++ b/gdbsupport/safe-strerror.cc > @@ -26,14 +26,14 @@ > function. */ > > /* Called if we have a XSI-compliant strerror_r. */ > -ATTRIBUTE_UNUSED static char * > +[[maybe_unused]] static char * > select_strerror_r (int res, char *buf) > { > return res == 0 ? buf : nullptr; > } > > /* Called if we have a GNU strerror_r. */ > -ATTRIBUTE_UNUSED static char * > +[[maybe_unused]] static char * > select_strerror_r (char *res, char *) > { > return res; > diff --git a/gdbsupport/thread-pool.cc b/gdbsupport/thread-pool.cc > index 4dc72e566428..12329ea98831 100644 > --- a/gdbsupport/thread-pool.cc > +++ b/gdbsupport/thread-pool.cc > @@ -44,14 +44,14 @@ > takes a printf-style format and an argument. This wrapper handles the > difference. */ > > -ATTRIBUTE_UNUSED static void > +[[maybe_unused]] static void > do_set_thread_name (int (*set_name) (pthread_t, const char *, void *), > const char *name) > { > set_name (pthread_self (), "%s", const_cast (name)); > } > > -ATTRIBUTE_UNUSED static void > +[[maybe_unused]] static void > do_set_thread_name (int (*set_name) (pthread_t, const char *), > const char *name) > { > @@ -60,7 +60,7 @@ do_set_thread_name (int (*set_name) (pthread_t, const char *), > > /* The macOS man page says that pthread_setname_np returns "void", but > the headers actually declare it returning "int". */ > -ATTRIBUTE_UNUSED static void > +[[maybe_unused]] static void > do_set_thread_name (int (*set_name) (const char *), const char *name) > { > set_name (name); > > base-commit: cdfda31c0d6b85cfff7fddeabffa570176161548