This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] make a few variables static


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4f2a7b5121a682dd924cafc252c8ded8813f0f61

commit 4f2a7b5121a682dd924cafc252c8ded8813f0f61
Author: Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
Date:   Wed Apr 13 04:15:10 2016 -0400

    make a few variables static
    
    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.
    
    gas/ChangeLog:
    
    2016-04-14  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
    
    	* 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.

Diff:
---
 gas/ChangeLog         | 6 ++++++
 gas/config/tc-nios2.c | 2 +-
 gas/config/tc-ppc.c   | 2 +-
 gas/config/tc-sparc.c | 2 +-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/gas/ChangeLog b/gas/ChangeLog
index 46fb0fe..7e9e517 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,11 @@
 2016-04-14  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
 
+	* 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.
+
+2016-04-14  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
 	* config/tc-m32c.c (M32C_Macros): Remove.
 	* config/tc-msp430.c (option_numbers): Likewise.
 
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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]