From patchwork Thu Jul 12 20:52:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 28344 Received: (qmail 53920 invoked by alias); 12 Jul 2018 20:52:17 -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 53776 invoked by uid 89); 12 Jul 2018 20:52:16 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1615 X-HELO: gateway23.websitewelcome.com Received: from gateway23.websitewelcome.com (HELO gateway23.websitewelcome.com) (192.185.48.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Jul 2018 20:52:15 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway23.websitewelcome.com (Postfix) with ESMTP id 51CFB10694 for ; Thu, 12 Jul 2018 15:52:14 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id diZSfi3pbRPojdiZSfH6Bk; Thu, 12 Jul 2018 15:52:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=1sb/Nwcdv70z8+PKgixUaczMFIBUzxfwPa8Df6tBlv0=; b=WrTae3WJDyBMKM5AUV8W7/57Ud AplNnI8CGFin4lP0CHzZbH+1cQH5qvLy8Hxy/IXvZetRrnAQ+6YgBZ80UOb4TFFNL9vbUB+IM4uEs 9cPgI0vxEiPUclyGN5JE+7bHk; Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:49432 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fdiZS-001ZuD-2E; Thu, 12 Jul 2018 15:52:14 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 12/13] Add ATTRIBUTE_UNUSED to regdat.sh output Date: Thu, 12 Jul 2018 14:52:07 -0600 Message-Id: <20180712205208.32646-13-tom@tromey.com> In-Reply-To: <20180712205208.32646-1-tom@tromey.com> References: <20180712205208.32646-1-tom@tromey.com> This changes regdat.sh to emit ATTRIBUTE_UNUSED for the xmltarget_${name} variable. This seemed simpler than trying to figure out under exactly which circumstances each one was in fact used. 2018-07-12 Tom Tromey * regformats/regdat.sh: Mark xmltarget_${name} with ATTRIBUTE_UNUSED. --- gdb/ChangeLog | 5 +++++ gdb/regformats/regdat.sh | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gdb/regformats/regdat.sh b/gdb/regformats/regdat.sh index 5a8564ac50c..7868e757582 100755 --- a/gdb/regformats/regdat.sh +++ b/gdb/regformats/regdat.sh @@ -164,12 +164,12 @@ done echo echo "static const char *expedite_regs_${name}[] = { \"`echo ${expedite} | sed 's/,/", "/g'`\", 0 };" if test "${feature}" != x; then - echo "static const char *xmltarget_${name} = 0;" + echo "static const char *xmltarget_${name} ATTRIBUTE_UNUSED = 0;" elif test "${xmltarget}" = x; then if test "${xmlarch}" = x && test "${xmlosabi}" = x; then - echo "static const char *xmltarget_${name} = 0;" + echo "static const char *xmltarget_${name} ATTRIBUTE_UNUSED = 0;" else - echo "static const char *xmltarget_${name} = \"@\\" + echo "static const char *xmltarget_${name} ATTRIBUTE_UNUSED = \"@\\" if test "${xmlarch}" != x; then echo "${xmlarch}\\" fi @@ -179,7 +179,7 @@ elif test "${xmltarget}" = x; then echo "\";" fi else - echo "static const char *xmltarget_${name} = \"${xmltarget}\";" + echo "static const char *xmltarget_${name} ATTRIBUTE_UNUSED = \"${xmltarget}\";" fi echo