diff options
author | Trevor Saunders <tbsaunde+binutils@tbsaunde.org> | 2016-03-20 01:34:02 -0400 |
---|---|---|
committer | Trevor Saunders <tbsaunde+binutils@tbsaunde.org> | 2016-03-22 19:16:06 -0400 |
commit | b9bb4a935677558b76795d2053263a8981578f54 (patch) | |
tree | bb30ab321ff3ec0688e5d328afd7e56d33803a0f /gas/symbols.c | |
parent | 986d894b2a5484e522d540b24c0c9cf266fabacb (diff) | |
download | gdb-b9bb4a935677558b76795d2053263a8981578f54.zip gdb-b9bb4a935677558b76795d2053263a8981578f54.tar.gz gdb-b9bb4a935677558b76795d2053263a8981578f54.tar.bz2 |
make more variables const
gas/ChangeLog:
2016-03-22 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-h8300.c (h8300_elf_section): Add const qualifiers.
* config/tc-ia64.c (obj_elf_vms_common): Likewise.
* config/tc-m68hc11.c (md_begin): Likewise.
(print_opcode_list): Likewise.
* config/tc-msp430.c (msp430_section): Likewise.
* config/tc-score.c (struct s3_insn_to_dependency): Likewise.
(s3_build_dependency_insn_hsh): Likewise.
* config/tc-score7.c (struct s7_insn_to_dependency): Likewise.
(s7_build_dependency_insn_hsh): Likewise.
* config/tc-tic4x.c: Likewise.
* config/tc-tic54x.c (tic54x_set_default_include): Likewise.
(subsym_get_arg): Likewise.
* config/tc-xtensa.c (struct suffix_reloc_map): Likewise.
(get_directive): Likewise.
(cache_literal_section): Likewise.
* config/xtensa-relax.c: Likewise.
* symbols.c (symbol_create): Likewise.
(local_symbol_make): Likewise.
(symbol_relc_make_expr): Likewise.
include/ChangeLog:
2016-03-22 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* opcode/i960.h: Add const qualifiers.
* opcode/tic4x.h (struct tic4x_inst): Likewise.
Diffstat (limited to 'gas/symbols.c')
-rw-r--r-- | gas/symbols.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gas/symbols.c b/gas/symbols.c index 62eaf18..c69e400 100644 --- a/gas/symbols.c +++ b/gas/symbols.c @@ -66,7 +66,7 @@ struct obstack notes; const char * an_external_name; #endif -static char *save_symbol_name (const char *); +static const char *save_symbol_name (const char *); static void fb_label_init (void); static long dollar_label_instance (long); static long fb_label_instance (long); @@ -101,7 +101,7 @@ symbol_new (const char *name, segT segment, valueT valu, fragS *frag) /* Save a symbol name on a permanent obstack, and convert it according to the object file format. */ -static char * +static const char * save_symbol_name (const char *name) { size_t name_length; @@ -132,7 +132,7 @@ symbol_create (const char *name, /* It is copied, the caller can destroy/modify. valueT valu, /* Symbol value. */ fragS *frag /* Associated fragment. */) { - char *preserved_copy_of_name; + const char *preserved_copy_of_name; symbolS *symbolP; preserved_copy_of_name = save_symbol_name (name); @@ -190,7 +190,7 @@ static unsigned long local_symbol_conversion_count; struct local_symbol * local_symbol_make (const char *name, segT section, valueT val, fragS *frag) { - char *name_copy; + const char *name_copy; struct local_symbol *ret; ++local_symbol_count; @@ -3109,7 +3109,7 @@ symbol_relc_make_value (offsetT val) char * symbol_relc_make_expr (expressionS * exp) { - char * opstr = NULL; /* Operator prefix string. */ + const char * opstr = NULL; /* Operator prefix string. */ int arity = 0; /* Arity of this operator. */ char * operands[3]; /* Up to three operands. */ char * concat_string = NULL; |