From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49854 invoked by alias); 13 Apr 2016 08:13:30 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 49800 invoked by uid 89); 13 Apr 2016 08:13:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1779, 2016-04-13, 20160413 X-HELO: paperclip.tbsaunde.org Received: from tbsaunde.org (HELO paperclip.tbsaunde.org) (66.228.47.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 13 Apr 2016 08:13:19 +0000 Received: from keg.corp.tor1.mozilla.com (unknown [66.207.193.21]) by paperclip.tbsaunde.org (Postfix) with ESMTPSA id C2381C0A4; Wed, 13 Apr 2016 08:13:16 +0000 (UTC) From: tbsaunde+binutils@tbsaunde.org To: binutils@sourceware.org Cc: Trevor Saunders Subject: [PATCH] make a few variables static Date: Wed, 13 Apr 2016 08:13:00 -0000 Message-Id: <1460535504-25795-1-git-send-email-tbsaunde+binutils@tbsaunde.org> X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00187.txt.bz2 From: Trevor Saunders Hi, They are only used in one file, so we might as well restrict there scope to that file, and theoretically this might slightly improve compilers ability to optimize usage of these variables. built crosses to sparc-elf, ppc64-elf, and nios2-elf, ok? Trev gas/ChangeLog: 2016-04-13 Trevor Saunders * config/tc-nios2.c (nios2_as_options): Make file static. * config/tc-ppc.c (toc_reloc_ypes): Likewise. * config/tc-sparc.c (native_op_table): Likewise. --- gas/config/tc-nios2.c | 2 +- gas/config/tc-ppc.c | 2 +- gas/config/tc-sparc.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gas/config/tc-nios2.c b/gas/config/tc-nios2.c index bf37ff7..d207758 100644 --- a/gas/config/tc-nios2.c +++ b/gas/config/tc-nios2.c @@ -98,7 +98,7 @@ typedef enum } relax_optionT; /* Struct contains all assembler options set with .set. */ -struct +static struct { /* .set noat -> noat = 1 allows assembly code to use at without warning and macro expansions generate a warning. diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index 1d2c57f..8bfdfdc 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -207,7 +207,7 @@ ppc_cpu_t sticky = 0; unsigned int ppc_abiversion = 0; /* Flags set on encountering toc relocs. */ -enum { +static enum { has_large_toc_reloc = 1, has_small_toc_reloc = 2 } toc_reloc_types; diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c index a51ca1f..b956131 100644 --- a/gas/config/tc-sparc.c +++ b/gas/config/tc-sparc.c @@ -758,7 +758,7 @@ md_show_usage (FILE *stream) } /* Native operand size opcode translation. */ -struct +static struct { const char *name; const char *name32; -- 2.1.4